Search for a tool
Precision and Recall

Tool to compute statistical measures of Precision and Recall. Precision and recall are two statistical measures which can evaluate sets of items.

Results

Precision and Recall -

Tag(s) : Data Processing, Statistics

Share
Share
dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!


Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!


Feedback and suggestions are welcome so that dCode offers the best 'Precision and Recall' tool for free! Thank you!

Precision and Recall

Precision P and Recall R Calculator

From data sets to compare

Items has to be distinct, duplicates will be removed








From data values




Answers to Questions (FAQ)

What are precision and recall? (Definition)

Accuracy and recall are two statistical metrics used to evaluate detection, classification, or information retrieval systems. They compare two sets: the set of items retrieved (or predicted positive) and the set of expected items (the reference or gold standard).

— Accuracy (positive predictive value) measures the reliability of the returned items.

— Recall (true positive rate or sensitivity) measures the system's ability to retrieve relevant items.

For an overview, the user can refer to the confusion matrix.

How to calculate Precision?

In information retrieval, precision is the ratio between the number of relevant items retrieved and the total number of items retrieved.

$$ \text{Precision}=\frac{|\{\text{Relevant items}\}\cap\{\text{Retrieved items}\}|}{|\{\text{Retrieved items}\}|} $$

Example: The reference set (expected items) is A,B,C,D,E (5 items) and the retrieved items are B,C,D,F (4 items). The set of expected items that were retrieved is B,C,D (3 common items). The item F is a false positive. Precision is: $ P = \frac{3}{4} = 75\% $

How to calculate Recall?

Recall is the ratio between the number of relevant items retrieved and the total number of relevant items expected.

$$ \text{Recall}=\frac{|\{\text{Relevant items}\}\cap\{\text{Retrieved items}\}|}{|\{\text{Relevant items}\}|} $$

Example: The reference set of expected elements is A,B,C,D,E (5 elements) and the retrieved elements are B,C,D,F (4 elements). The retrieved expected elements are B,C,D (3 elements). The elements A and E are false negatives. The recall is: $ R = \frac{3}{5} = 60\% $

How to calculate F-measure (F1 score)?

In statistics, the F-measure $ F_1 $ (or F-score) is the harmonic mean of precision $ P $ and recall $ R $, which penalizes imbalances between these two quantities.

$$ F = \frac{2 (P \times R)}{(P + R)} $$

The $ F_1 $ score ranges from 0 to 1: it is high (close to 1) only if both precision and recall are high.

Which Venn diagram represents precision and recall?

The following diagram includes precision, recall, true positive (TP), false positive (FP), true negative (TN) and false negative (FN) (source wikipedia)<dfn>precision-recall</dfn>

Source code

dCode retains ownership of the "Precision and Recall" source code. Any algorithm for the "Precision and Recall" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Precision and Recall" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Precision and Recall" or any other element are not public (except explicit open source licence). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.

Cite dCode

The content of the page "Precision and Recall" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).

Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).

To cite dCode.fr on another website, use the link: https://www.dcode.fr/precision-recall

In a scientific article or book, the recommended bibliographic citation is: Precision and Recall on dCode.fr [online website], retrieved on 2026-03-17, https://www.dcode.fr/precision-recall

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'Precision and Recall' tool for free! Thank you!


https://www.dcode.fr/precision-recall
© 2026 dCode — The ultimate collection of tools for games, math, and puzzles.
â–˛  
Feedback