# Precision and recall

**precisionrecallF-measurePrecision, recallrecall and precisionRecall (information retrieval)recall accuracyrecall/precision“recall” and “precision”**

In pattern recognition, information retrieval and classification (machine learning), precision (also called positive predictive value) is the fraction of relevant instances among the retrieved instances, while recall (also known as sensitivity) is the fraction of the total amount of relevant instances that were actually retrieved.wikipedia

85 Related Articles

### Information retrieval

**queryretrievalqueries**

In pattern recognition, information retrieval and classification (machine learning), precision (also called positive predictive value) is the fraction of relevant instances among the retrieved instances, while recall (also known as sensitivity) is the fraction of the total amount of relevant instances that were actually retrieved. In information retrieval contexts, precision and recall are defined in terms of a set of retrieved documents (e.g. the list of documents produced by a web search engine for a query) and a set of relevant documents (e.g. the list of all documents on the internet that are relevant for a certain topic), cf. In the field of information retrieval, precision is the fraction of retrieved documents that are relevant to the query:

Traditional evaluation metrics, designed for Boolean retrieval or top-k retrieval, include precision and recall.

### Positive and negative predictive values

**positive predictive valuenegative predictive valuepositive**

In pattern recognition, information retrieval and classification (machine learning), precision (also called positive predictive value) is the fraction of relevant instances among the retrieved instances, while recall (also known as sensitivity) is the fraction of the total amount of relevant instances that were actually retrieved.

In information retrieval, the PPV statistic is often called the precision.

### Relevance

**irrelevantrelevantrelevancy**

Both precision and recall are therefore based on an understanding and measure of relevance.

Given a conception of relevance, two measures have been applied: Precision and recall:

### Statistical classification

**classificationclassifierclassifiers**

In pattern recognition, information retrieval and classification (machine learning), precision (also called positive predictive value) is the fraction of relevant instances among the retrieved instances, while recall (also known as sensitivity) is the fraction of the total amount of relevant instances that were actually retrieved.

The measures precision and recall are popular metrics used to evaluate the quality of a classification system.

### Receiver operating characteristic

**ROC curveAUCROC**

Recall and Inverse Recall, or equivalently true positive rate and false positive rate, are frequently plotted against each other as ROC curves and provide a principled mechanism to explore operating point tradeoffs.

The true-positive rate is also known as sensitivity, recall or probability of detection in machine learning.

### Youden's J statistic

**InformednessYouden's index**

Examples of measures that are a combination of precision and recall are the F-measure (the weighted harmonic mean of precision and recall), or the Matthews correlation coefficient, which is a geometric mean of the chance-corrected variants: the regression coefficients Informedness (DeltaP') and Markedness (DeltaP).

An unrelated but commonly used combination of basic statistics from Information Retrieval is the F-score, being a (possibly weighted) harmonic mean of recall and precision where recall = sensitivity = true positive rate, but specificity and precision are totally different measures.

### Harmonic mean

**weighted harmonic meanharmonicHarmonically**

Examples of measures that are a combination of precision and recall are the F-measure (the weighted harmonic mean of precision and recall), or the Matthews correlation coefficient, which is a geometric mean of the chance-corrected variants: the regression coefficients Informedness (DeltaP') and Markedness (DeltaP).

In computer science, specifically information retrieval and machine learning, the harmonic mean of the precision (true positives per predicted positive) and the recall (true positives per real positive) is often used as an aggregated performance score for the evaluation of algorithms and systems: the F-score (or F-measure).

### F1 score

**F-MeasureF-scoreF1**

The two measures are sometimes used together in the F1 Score (or f-measure) to provide a single measurement for a system.

It considers both the precision p and the recall r of the test to compute the score: p is the number of correct positive results divided by the number of all positive results returned by the classifier, and r is the number of correct positive results divided by the number of all relevant samples (all samples that should have been identified as positive).

### Type I and type II errors

**Type I errorfalse-positivefalse positive**

In statistics, if the null hypothesis is that all items are irrelevant (where the hypothesis is accepted or rejected based on the number selected compared with the sample size), absence of type I and type II errors (i.e. perfect sensitivity and specificity of 100% each) corresponds respectively to perfect precision (no false positive) and perfect recall (no false negative).

### Accuracy and precision

**accuracyprecisionaccurate**

Accuracy is a weighted arithmetic mean of Precision and Inverse Precision (weighted by Bias) as well as a weighted arithmetic mean of Recall and Inverse Recall (weighted by Prevalence). The first problem is 'solved' by using Accuracy and the second problem is 'solved' by discounting the chance component and renormalizing to Cohen's kappa, but this no longer affords the opportunity to explore tradeoffs graphically.

Commonly used metrics include the notions of precision and recall.

### Sensitivity and specificity

**sensitivityspecificitysensitive**

In pattern recognition, information retrieval and classification (machine learning), precision (also called positive predictive value) is the fraction of relevant instances among the retrieved instances, while recall (also known as sensitivity) is the fraction of the total amount of relevant instances that were actually retrieved. In statistics, if the null hypothesis is that all items are irrelevant (where the hypothesis is accepted or rejected based on the number selected compared with the sample size), absence of type I and type II errors (i.e. perfect sensitivity and specificity of 100% each) corresponds respectively to perfect precision (no false positive) and perfect recall (no false negative).

The values of sensitivity and specificity are agnostic to the percent of positive cases in the population of interest (as opposed to, for example, precision).

### Uncertainty coefficient

**proficiencyProficiency (metric)Theil's U**

The uncertainty coefficient is useful for measuring the validity of a statistical classification algorithm and has the advantage over simpler accuracy measures such as precision and recall in that it is not affected by the relative fractions of the different classes, i.e., P(x)

### Pattern recognition

**pattern analysispattern detectionpatterns**

In pattern recognition, information retrieval and classification (machine learning), precision (also called positive predictive value) is the fraction of relevant instances among the retrieved instances, while recall (also known as sensitivity) is the fraction of the total amount of relevant instances that were actually retrieved.

### Search engine (computing)

**search enginesearch enginessearch engines**

When a search engine returns 30 pages only 20 of which were relevant while failing to return 40 additional relevant pages, its precision is 20/30 = 2/3 while its recall is 20/60 = 1/3.

### Statistics

**statisticalstatistical analysisstatistician**

In statistics, if the null hypothesis is that all items are irrelevant (where the hypothesis is accepted or rejected based on the number selected compared with the sample size), absence of type I and type II errors (i.e. perfect sensitivity and specificity of 100% each) corresponds respectively to perfect precision (no false positive) and perfect recall (no false negative).

### Null hypothesis

**nullnull hypotheseshypothesis**

In statistics, if the null hypothesis is that all items are irrelevant (where the hypothesis is accepted or rejected based on the number selected compared with the sample size), absence of type I and type II errors (i.e. perfect sensitivity and specificity of 100% each) corresponds respectively to perfect precision (no false positive) and perfect recall (no false negative).

### Matthews correlation coefficient

**Matthews Correlation**

Examples of measures that are a combination of precision and recall are the F-measure (the weighted harmonic mean of precision and recall), or the Matthews correlation coefficient, which is a geometric mean of the chance-corrected variants: the regression coefficients Informedness (DeltaP') and Markedness (DeltaP).

### Geometric mean

**geometric averagegeometricmean**

### Linear regression

**regression coefficientmultiple linear regressionregression**

### Markedness

**unmarkedmarked(unmarked)**

### Cohen's kappa

**kappakappa statisticKappa coefficient**

The first problem is 'solved' by using Accuracy and the second problem is 'solved' by discounting the chance component and renormalizing to Cohen's kappa, but this no longer affords the opportunity to explore tradeoffs graphically.

### Web search engine

**search enginesearch enginesweb search**

In information retrieval contexts, precision and recall are defined in terms of a set of retrieved documents (e.g. the list of documents produced by a web search engine for a query) and a set of relevant documents (e.g. the list of all documents on the internet that are relevant for a certain topic), cf.

### Relevance (information retrieval)

**relevancerelevantrelevancy ranking**

In the field of information retrieval, precision is the fraction of retrieved documents that are relevant to the query:

### Contingency table

**cross tabulationcontingency tablescrosstab**

The four outcomes can be formulated in a 2×2 contingency table or confusion matrix, as follows:

### Confusion matrix

**confusion matrices**

The four outcomes can be formulated in a 2×2 contingency table or confusion matrix, as follows: