ATLAS NOVA My AtlasVelocer ↗

Concept · Machine learning

Precision and recall

Precision and recall are two numbers that judge how well a classifier's labels match reality, where precision is the fraction of items called positive that really are positive and recall is the fraction of real positives that the classifier managed to find.

Two numbers do most of that work. Precision is the fraction of the items the classifier called positive that really are positive: of everything it flagged, how much was right. Recall is the fraction of the real positives that the classifier managed to find: of everything that should have been flagged, how much was caught. The two answer different questions, and a system can be good at one while poor at the other.

Key facts
0.95Altmetric's precision for identifying research mentions in news stories, Fleerackers et al. 2022⁠[1]
0.33Precision on the imbalanced sample versus 0.6 balanced, Saito and Rehmsmeier 2015⁠[2]
0.116Area under precision-recall curve for logistic regression predicting cerebral edema, Martin et al. 2025⁠[3]
81%Precision of context-aware radiology report search versus 27% for Google Desktop, Wu et al. 2011⁠[4]

Overview

Precision and recall

A concrete case makes the difference plain. A search engine looking through radiology reports for a finding such as appendicitis returns a list of reports. Precision asks how many of the returned reports actually describe the finding; recall asks how many of the reports that describe it were returned at all. A search that returns three reports, only one of which is relevant, has low precision even if those three were the only relevant reports in the whole archive, in which case its recall is perfect. The same logic applies to a spam filter, a fraud detector, or a model that predicts which patients will develop a disease.

C.E. Shannon.
C.E. Shannon. View full-size image.C.E. Shannon. Tekniska museet 43069 (cropped) by Unknown author Unknown author. CC BY 2.0, via Wikimedia Commons. Scaled to 960 pixels wide; no crop or other changes by Atlas Nova.
Figure 1. Precision and recall of two radiology report search engines. Precision and recall percentages for a context-aware search engine and a generic search engine on 464 radiology reports. The source states: “RadReportMiner achieved a higher precision (81%), compared with Google Desktop (27%; p < 0.0001). RadReportMiner had a lower recall (72%) compared with Google Desktop (87%; p = 0.006).” (Wu et al. (2011)).⁠[4]

Both numbers rest on four possible outcomes for each item, laid out in what is called a confusion matrix. A true positive is a real positive that was flagged; a false positive is a negative that was wrongly flagged; a true negative is a negative correctly left alone; a false negative is a real positive that was missed. Precision is true positives divided by all flagged items, true and false positives together, so it takes no account of how many negatives were correctly ignored. Recall is true positives divided by all real positives, found and missed together, so it takes no account of false alarms. Each measure is blind to one kind of mistake, which is why neither alone describes a classifier.

The pair matters most when one class is rare. A classifier that labels almost everything negative will be right most of the time if positives are scarce, so plain accuracy looks flattering while the classifier misses nearly every case worth finding. Precision exposes this: if only a small share of the items it flags are real positives, the flags are mostly noise. Recall exposes the opposite failure, a cautious classifier that finds only a handful of the cases that exist. A system that ignores the context of a search term illustrates the first failure, returning reports that mention a disease only to deny it; such a search can look thorough while burying the relevant reports among false alarms.⁠[4]

The two measures also pull against each other. Loosening a classifier so that it flags more items tends to catch more of the real positives, raising recall, but it also sweeps in more negatives, lowering precision; tightening it does the reverse. This tension is not a flaw in either measure but a property of where the classifier's threshold is set, and it is treated in its own right later. Because of it, a single summary is often wanted, and the choice of summary is disputed: the harmonic mean of the two, known as the F1 score, is one common answer, and the Matthews correlation coefficient, which draws on all four cells of the confusion matrix, is another, with arguments on both sides about which is more trustworthy when classes are unbalanced.⁠[5] Those arguments belong to a later section.

What the pair offers, before any summary is chosen, is a way to say what kind of error a system makes. Precision and recall are defined in the language of retrieval, where the items are documents and the question is which ones to return, and they carry over to any classifier that must decide which cases to flag.⁠[5] Their weakness is that each is a single number for a single threshold, and a classifier's behaviour changes as that threshold moves; the curve that traces the whole range, and the area beneath it, come later.

History

From library catalogues to machine learning

The two measures were not invented for machine learning. They took shape in information retrieval, the field concerned with searching collections of documents, where a system is asked to return the items relevant to a query and the natural questions are how much of the relevant material came back and how much of what came back was relevant. Precision and recall name those two quantities, and the vocabulary of retrieval, with its documents, queries and returned sets, is where the definitions were first worked out.⁠[6]

Two overlapping circles show relevant and returned documents with counts for four outcomes, beside numbered precision, recall and classifier terminology panels.
Overlapping relevant and returned document sets define precision and recall, and the same definitions apply to binary classifiers. The 20-document collection is an illustrative example. View full-size image.From Retrieval to Binary Classification by Atlas Nova. Illustration generated with AI for this article and checked against its text.

Almost as soon as the measures were in use, a pattern appeared: as a search was made to return more of the relevant documents, the share of relevant items among those returned tended to fall. Cyril Cleverdon, reporting on the Cranfield tests of retrieval systems, put the claim forward in a guarded form after earlier, blunter statements met objection. His final version holds that within a single system, when a sequence of searches for a question is made in the expected order of decreasing precision and the results of several searches are averaged, there is an inverse relationship between recall and precision.⁠[7] The qualifications matter as much as the claim: it is a statement about how a system behaves as more documents are retrieved, not a law that binds any two numbers a classifier might produce.

The setting changed, but the arithmetic did not. As statistical classifiers spread through machine learning and then through bioinformatics, the same pair was applied to problems where the items are not documents but patients, genes, protein pairs or candidate binding sites, and where the positive class is whatever the model is meant to find.⁠[5] A classifier that predicts which microRNA targets which gene, or which patients carry a tumour, is judged by the same two fractions, and the older retrieval vocabulary of relevant and retrieved items carries over intact.⁠[2]

What the new setting added was a demand for a single number. Comparing many classifiers, or tuning one, is awkward when the verdict comes as a pair that move in opposite directions, so summaries were built. The F1 score is the harmonic mean of precision and recall, a way of averaging the two that punishes a lopsided result: a classifier strong on one and weak on the other scores lower than its arithmetic average would suggest. A second summary, the Matthews correlation coefficient, takes a different route, combining all four cells of the confusion matrix into a single correlation-like value; it was developed in 1975 for comparing chemical structures and later re-proposed as a standard measure for machine learning, and it has been adopted as the main evaluation measure in some large genomics projects.⁠[5]

Which summary deserves trust, and what each one hides, is a question with arguments on both sides, taken up later. What the history shows is that the two fractions survived the move from catalogues to classifiers because they answer questions that do not depend on the machinery: how much was found, and how much of what was found was worth having.

Main ideas

The four outcomes behind the two numbers

Every binary decision a classifier makes lands in one of four boxes, and the whole of precision and recall is read off those boxes. A true positive is a real positive the classifier flagged. A false positive is a negative it flagged anyway. A true negative is a negative it correctly left alone. A false negative is a real positive it let pass. The four counts are usually set out as a two-by-two table called a confusion matrix, with the classifier's decisions along one side and the truth along the other, and every basic performance measure is a ratio built from its cells.⁠[2]

Precision is the true positives divided by everything the classifier flagged, true positives plus false positives. It asks a narrow question: among the items that came back with a positive label, what share deserved it? False negatives play no part in that fraction, because a case the classifier never flagged cannot dilute the quality of the flags it did make. Recall is the mirror image. It is the true positives divided by all the real positives, those found plus those missed, so it asks what share of the genuinely positive cases the classifier caught. False positives play no part in it, because a wrong flag does not reduce the count of real cases that were successfully found. Each measure is deliberately blind to one of the two ways of being wrong, which is exactly why a single number cannot stand in for both.

The blindness has consequences that show up sharply when the two classes are unequal in number. Take a small illustration in which a classifier is applied first to a sample with equal numbers of positives and negatives and then to a sample of the same size in which negatives outnumber positives three to one. Several common measures return the same value on both samples, and that unchanged value fails to register how much worse the classifier does on the imbalanced one. Precision, by contrast, moves: it reads 0.6 on the balanced sample and 0.33 on the imbalanced one, and the drop is easy to interpret, since a precision of 0.33 means a third of the positive predictions were correct.⁠[2] The reason is that precision is computed along the row of positive predictions, and when negatives dominate the sample, a classifier that leans toward the majority class fills that row with false positives. Recall, computed along the column of real positives, is not moved by the same mechanism, which is why the pair is often reported together: one measure catches the damage that imbalance does to the flags, the other catches the cases that were never flagged at all.

From one threshold to a whole curve

A single precision and a single recall describe a classifier only at one setting. Most classifiers do not simply announce positive or negative; they produce a score, and a threshold turns that score into a decision, with everything above the line called positive and everything below called negative. Move the line and the four counts in the confusion matrix all change, so precision and recall change with them. Reporting one pair of numbers therefore reports one arbitrary point on a continuum, and comparing two classifiers by their single-threshold scores can mislead when the thresholds were chosen differently or not chosen deliberately at all.⁠[8]

The remedy is to sweep the threshold across its whole range and plot the result. A precision-recall curve puts recall on one axis and precision on the other and traces the pairs obtained at every possible threshold, giving a picture of the classifier's behaviour rather than a snapshot of one setting.⁠[8] The curve can then be reduced to a single number by taking the area under the precision-recall curve, usually written AUC-PR, which rewards a classifier whose precision stays high as recall climbs. Computing that area is less straightforward than it sounds, because the points of a precision-recall curve must be joined by a non-linear interpolation rather than the straight lines used for the older receiver operating characteristic curve; the choice of interpolation can shift the area, and software that ignores this can misstate it,.⁠[8][9] The curve and its area are a threshold-free summary, and the question of when this summary is more trustworthy than its older rival is taken up later.

Precision and recall each ignore one kind of error; the curve shows both kinds across every threshold at once.

The four outcomes of each binary decision are the cells from which precision and recall are computed.

Why the two measures pull against each other

The tension between precision and recall is easiest to see by imagining two classifiers at opposite ends of a dial. A cautious classifier flags an item only when it is nearly certain, so almost everything it flags is a real positive and its precision is high; but it lets many real positives pass unflagged, so its recall is low. A permissive classifier flags anything with the faintest hint of the positive class, so it catches nearly every real positive and its recall is high; but its flags are thick with false positives, so its precision is low. Turning the dial one way buys recall at the price of precision, and turning it the other way does the reverse. The two numbers are not independent quantities that a system might happen to get both of; they are read off the same four counts, and moving the threshold shifts items between the cells in a way that pushes one fraction up as the other comes down.

A diagram divided into quadrants labeled TP, FN, FP and TN, with dots for relevant and irrelevant elements, arrows for recall and precision, and a legend for a perfect classifier and a classification model.
A diagram divided into quadrants labeled TP, FN, FP and TN, with dots for relevant and irrelevant elements, arrows for recall and precision, and a legend for a perfect classifier and a classification model. View full-size image.Precision-Recall tradeoff by Pouria. CC BY-SA 4.0, via Wikimedia Commons. Scaled to 960 pixels wide; no crop or other changes by Atlas Nova.

That the trade-off is not merely a quirk of careless design was shown mathematically. Michael Buckland and Fredric Gey examined the relationship between the two measures under different assumptions about how well a retrieval system performs, and demonstrated that a trade-off between recall and precision is unavoidable whenever retrieval performance is consistently better than retrieval at random.⁠[6] The reasoning is that a system beating chance finds relevant items faster than it finds irrelevant ones, so as it is pushed to retrieve more, the additional items it reaches are progressively less likely to be relevant, and precision falls. A related derivation by Michael Gordon and Manfred Kochen traced the trade-off to a deceleration in the proportion of relevant documents retrieved over time, and found that the equation best modelling recall as a function of time was the logarithm of a quadratic function.⁠[10] The practical upshot is that the trade-off is a structural feature of searching a collection, not a sign that something has gone wrong.

A working search engine shows the trade-off in concrete terms. A context-aware search engine for radiology reports, built to recognise when a finding was negated or described as uncertain, was compared against a generic word-matching engine on a corpus of 464 reports covering five findings. The context-aware system reached a precision of 81 percent against 27 percent for the generic engine, a large gain in the share of returned reports that were genuinely relevant, but its recall was 72 percent against 87 percent, so it paid for that precision by missing more of the relevant reports.⁠[4] Neither engine was simply better; each sat at a different point on the dial, and which point is preferable depends on what the user is doing with the results.

The important qualification is that the trade-off belongs to the threshold, not to the classifier as a fixed law. A single classifier traced across all its thresholds does not have one precision and one recall but a whole curve of pairs, and the curve is the object that describes the system; the single pair is just one chosen operating point on it. Two classifiers can even be compared in a way that avoids the trade-off, since one dominates the other when its curve lies above the other's at every recall level. What cannot be done is to demand that a single threshold deliver both the highest precision and the highest recall at once, because the arithmetic of the four counts will not allow it.

Research

When a rare event makes accuracy misleading

The trouble with plain accuracy is that it counts every item equally, and in many real problems the items worth finding are a small minority of the whole. A classifier that predicts "negative" for everything will be right about the vast majority of cases and useless for the purpose it was built for. The imbalance can be extreme: in a dataset where nine in ten samples are healthy and one in ten have cancer, a model can reach high overall accuracy by correctly labelling the healthy majority while performing poorly on the cancer cases that motivated the exercise.⁠[11] The same skew arises naturally in medicine, where events such as mortality, clinical deterioration or acute kidney injury occur in fewer than 10 to 20 percent of patients, and in ecology, where species distribution models are often applied to rare species.⁠[3][12]

Precision and recall are built to survive this skew, because each is computed along a single row or column of the confusion matrix rather than across the whole table. Precision divides by the number of positive predictions, so a flood of correctly ignored negatives never enters the fraction; recall divides by the number of real positives, so it measures directly how many of the scarce cases were caught. A small illustration makes the point. When the same classifier is applied to a balanced sample and to an imbalanced one of equal size, several common measures return an identical value on both and so fail to register the drop in performance, while precision falls from 0.6 to 0.33 and reads immediately as a third of positive predictions being correct.⁠[2] Accuracy, in that comparison, stayed at 0.6 on both samples and gave no warning at all.

The receiver operating characteristic curve, a widely used threshold-free summary, has a subtler version of the same weakness. It plots sensitivity against the false positive rate, and the false positive rate is computed from the negatives. When negatives vastly outnumber positives, a model can keep a high true negative rate almost for free, so the area under the ROC curve can look excellent even when the model cannot reliably pick out the rare cases it exists to find. A simulation of critical-care prediction shows how far apart the two views can be. Virtual data for 200,000 pediatric patients with diabetic ketoacidosis were generated, with cerebral edema as the rare outcome, and three models were trained to predict it. The areas under the ROC curve were 0.953 for logistic regression, 0.874 for random forest and 0.947 for gradient boosting, all of which read as strong performance.

The areas under the precision-recall curve for the same three models were 0.116, 0.083 and 0.096. The ROC figures barely separate the models and suggest all three are good; the precision-recall figures are far lower and separate the models, with the logistic regression model's AUPRC statistically significantly higher than the gradient boosting model's.⁠[3] The reason is that the precision-recall curve replaces specificity with precision, and precision is not propped up by the abundance of true negatives.

AUPRC of three models predicting a rare event. The three models' precision-recall areas are far lower than their ROC areas and separate them. From this article: “The areas under the precision-recall curve for the same three models were 0.116, 0.083 and 0.096.”

The same contrast appears when the rarity of the event is varied deliberately. Species distribution models were simulated at three levels of prevalence and evaluated as the geographic extent of prediction was widened. The area under the precision-recall curve stayed robust to rarity and was not affected by the growing extent, whereas the area under the ROC curve was, because it incorporates the correctly predicted absences that accumulate when a large area is searched and the species is present in little of it.⁠[12] The advantage comes from what the precision-recall curve leaves out: it never counts true negatives, so it cannot be flattered by them.

None of this makes accuracy or the ROC curve wrong; it makes them answer a question other than the one that matters when positives are scarce. Accuracy asks how often the classifier is right overall, which is dominated by whichever class is common. The ROC curve asks how well the classifier separates the two classes across all thresholds, which a model can do respectably by being good at the common class alone. Precision asks what share of the flags are real, and recall asks what share of the real cases were flagged, and those are the questions a screening programme, a fraud detector or an alerting system actually poses. A model that labels almost everything negative can post a high specificity and a high area under the ROC curve while having no clinical value, because it detects few of the cases that matter.⁠[3]

The practical consequence is that a single flattering number should prompt a look at the class balance before it is trusted. When positives are rare, the precision-recall view is the one that reflects what happens when the model is deployed, and the ROC view can be reported alongside it without being allowed to settle the question alone. How the pair is combined into one number, and which summary deserves trust under imbalance, is covered later.

In practice

Measuring a classifier in practice

A classifier is judged by the work it is asked to do, and the two fractions are read against that work rather than in the abstract. A search engine for radiology reports offers a clean case because the user's purpose is unambiguous. Reports often mention a finding only to deny it, so a word-matching engine that returns every report containing the term "appendicitis" will hand back "No evidence of appendicitis" alongside the genuine cases. A context-aware engine built to recognise negation and uncertainty was compared with a generic word-matching engine on a corpus of 464 reports covering five findings, each report classified by a radiologist as positive or negative. The context-aware system reached a precision of 81% against 27% for the generic engine, while its recall was 72% against 87%.⁠[4] The trade is visible in the numbers: the context-aware engine returned a set in which four out of five reports were genuinely relevant, at the cost of missing more of the relevant reports that existed.

Five numbered workflow panels connect model scores to validation-based threshold selection and separate test evaluation, above a table highlighting threshold 0.50.
An illustrative validation table selects the threshold with the highest F1 among three candidates, then fixes it before evaluation on separate test data. The numbers and tissue illustrations are schematic, not results or images from the cited study. View full-size image.Choosing a Threshold Before Testing by Atlas Nova. Illustration generated with AI for this article and checked against its text.

Which side of that trade matters depends on what a miss costs relative to a false alarm. For a radiologist searching for a common finding, a false positive is a report that must be opened and discarded, and the accumulation of such reports is the main inefficiency; the study's authors put the burden in concrete terms, noting that at the generic engine's precision a search returning 200 reports would contain only 54 true positives, leaving 146 to be read and rejected.⁠[4] For a search aimed at a rare finding, the calculus reverses, since missing one of the few existing cases is worse than tolerating clutter. The same pair of numbers can therefore describe a good system or a poor one, and the verdict belongs to the application rather than to the metric.

Automated detectors raise the same question in a different setting. A system that scans online news for mentions of research, built to spare scholars the labour of reading every story, was checked against a manual content analysis of 400 news stories across eight outlets. Its precision was 0.95 and its recall 0.70, meaning that when it flagged a story as mentioning research it was almost always right, but it found roughly seven in ten of the mentions that were there.⁠[1] The asymmetry is deliberate and suits the use: a scholar who treats the flagged stories as a lower bound on coverage can work with a set that is nearly free of false alarms, whereas a set riddled with stories that mention no research would waste the time the tool was meant to save. The same study found that identification was more likely when a mention carried a hyperlink to the research item, an author name or a journal title, and less reliable for monographs, conference presentations, dissertations and non-English articles.⁠[1] Knowing where a detector is weak is part of knowing how far its output can be trusted.

Between a cautious system and a permissive one lies a dial that can be set rather than accepted. When a classifier produces a score, the threshold that converts the score into a decision determines where on the precision-recall trade the system sits, and the threshold can be chosen to suit the task. A deep learning model for detecting mitotic figures in tissue from canine perivascular wall tumours was tuned this way: an optimal decision threshold was fixed in advance on a validation set so as to maximise the F1 score, and applying it to the test set cut the number of false positive detections sharply, lifting precision and with it the F1 score, at a small cost in sensitivity.⁠[13] The threshold was not a property of the model but a choice about which error to tolerate, made before the test data were seen so that the choice could not be fitted to the results.

The cost of each error is what should drive that choice, and the costs are rarely symmetric. A missed case of a serious disease and a false alarm that sends a healthy patient for a needless test do not carry the same weight, and neither do a missed fraud and an innocent transaction frozen. Where a miss is expensive, the threshold is set low and recall is bought with precision; where a false alarm is expensive, as when each one consumes a clinician's or an analyst's time, the threshold is set high and precision is protected. The two fractions make that decision explicit and arguable, which is their practical value: a system's behaviour can be stated as a pair of numbers, the pair can be tied to the consequences of each kind of mistake, and the threshold can then be set to match. What the pair cannot do is settle the matter on its own, since it says nothing about how much each error costs until someone supplies that judgement.

Precision and recall describe where a system sits on a dial; the setting is chosen by weighing what a miss costs against what a false alarm costs.

Combining the pair into one number

A pair of numbers is awkward to compare. Two classifiers can each win on one measure and lose on the other, and a researcher tuning a model needs a single quantity that says which setting is better. The oldest answer is the F1 score, the harmonic mean of precision and recall. The harmonic mean differs from the ordinary average in one important way: it is pulled toward the smaller of the two values. A classifier with precision 0.9 and recall 0.1 has an arithmetic mean of 0.5 but an F1 of 0.18, because the harmonic mean punishes the lopsided result. That property is the point. A model that finds almost nothing, or that flags almost everything, cannot buy a respectable F1 by being excellent on one side of the pair. The measure was introduced independently in statistical ecology in 1948, rediscovered in information theory in the 1970s, and settled into its current name and notation in 1992, after which it became widely used in most application areas of machine learning.⁠[5] Its appeal is practical: it is one number, it is bounded between 0 and 1, and it refuses to reward a classifier that has abandoned one of the two jobs.

The Matthews correlation coefficient, or MCC, takes a different route to the same goal. Rather than averaging two fractions, it combines all four cells of the confusion matrix into a single value that behaves like a correlation between the classifier's labels and the truth, running from −1 through 0 to +1. A score near zero means the classifier is doing no better than chance; a score near +1 means it separates the classes well on both sides. The measure was developed in 1975 for comparing chemical structures and re-proposed in 2000 as a standard for machine learning, and the US Food and Drug Administration employed it as the main evaluation measure in its MAQC/SEQC projects.⁠[5] Because it draws on true negatives as well as true positives, it registers a classifier's failures on the majority class, which F1 by construction ignores.

The case for MCC rests on exactly that difference. Its proponents argue that it produces a high score only when a classifier does well in all four cells of the confusion matrix, in proportion both to the number of positives and to the number of negatives in the data, and that accuracy and F1 can return overoptimistic values on imbalanced data by comparison.⁠[5] A worked example shows the failure. In a sample of 91 sick patients and 9 healthy ones, a classifier that correctly identified 90 of the sick but only 1 of the healthy would post an accuracy of 0.90 and an F1 of 0.95, both close to perfect, while its MCC came out at −0.03, essentially chance.⁠[5] The first two numbers describe the classifier's success on the majority class; only the third registers that it cannot recognise a healthy person at all. A researcher reading only accuracy and F1 would conclude the model was excellent.

The counter-case is that MCC is not immune to the same distortions. A simulation study varied how common the positive class was and how imperfect the reference labels were, using realistic values for applications such as remote sensing, and found that the apparent magnitude of MCC, along with recall, precision, specificity, F1 and several other measures, was influenced greatly by both factors.⁠[14] The direction and size of the mis-estimation depended on the prevalence and on the nature of the errors in the reference standard. It was shown that a relatively high MCC may be estimated for an essentially worthless classification arising from a classifier with the skill of a coin tosser.⁠[14] The claim that a high MCC guarantees good performance on both classes therefore holds only when the reference labels are trustworthy and the class balance is known, conditions that real datasets often fail to meet.

Averaging across many classes

Both summaries were built for two classes, and real problems often have more. A model that sorts skin lesions into several diagnostic categories, or a classifier that assigns documents to one of many topics, produces a confusion matrix with a row and column per class, and the question becomes how to combine the per-class scores into one figure. Two conventions dominate. Macro-averaging computes the measure separately for each class and then takes the plain average, so every class counts equally regardless of how many items it contains. Micro-averaging pools the counts across all classes first and computes the measure once from the pooled table, so larger classes carry more weight. The two conventions differ in what they weight: macro-averaging averages the per-class statistics, while micro-averaging aggregates values within a confusion matrix and then calculates the statistic.⁠[15]

The distinction has a trap in it. When micro-averaged recall, micro-averaged precision and the micro-averaged F1 are computed from a multiclass confusion matrix, all three turn out to be equivalent to each other and to overall accuracy, and thus are redundant and should be avoided.⁠[15] A researcher who reports a micro-averaged F1 believing it captures something accuracy does not is reporting accuracy under another name. Weighted macro-averaging, in which each class's score is weighted by how common that class is, collapses to the same quantity for the same reason.⁠[15] Macro-averaging avoids the collapse, at the cost of letting a tiny class count as much as a large one.

No single summary escapes the underlying tension. F1 ignores true negatives and so can flatter a model on imbalanced data; MCC uses all four cells but can still be inflated by prevalence and imperfect labels; averaging conventions change what a multiclass number means.⁠[5] The choice of summary is therefore a statement about which errors matter for the task, and the arguments over which measure deserves trust are taken up, along with the other limits of these numbers, in the sections that follow.

The two summaries take different routes to a single figure for comparing classifiers.

Criticism

Limits, misreadings and open questions

A precision figure is not a property of a classifier alone. It depends on how common the positive class is in the data being classified, because the fraction of flags that are correct is built from the number of real positives as well as from the classifier's skill. The same model, applied to a population where the condition is common and to one where it is rare, will post different precision on each, and the difference can be large enough to reverse a comparison between two models. Recall is steadier, since it is computed along the column of real positives and does not divide by the count of flags, but it too can shift when the reference labels are imperfect. A precision of 0.8 measured on one dataset therefore says nothing on its own about what the same system will achieve on another, and quoting such a figure across studies as though it were a fixed attribute invites error.⁠[16]

Two branching population trees show positive and negative counts, four classification outcomes, flagged sets and precision calculations for 50% and 10% prevalence.
Two illustrative populations have the same recall and false positive rate but different prevalence. Precision falls from about 88.9% to 47.1% as positives become rarer, assuming reliable labels and unchanged conditional error rates. View full-size image.How Prevalence Changes Precision by Atlas Nova. Illustration generated with AI for this article and checked against its text.

The arithmetic behind this is worth stating plainly. Precision is the true positives divided by the true positives plus the false positives, and the false positives a classifier produces depend on how many negatives there are to be wrongly flagged. When positives are rare, the same false positive rate applied to a much larger pool of negatives yields many more false flags, and precision falls even though the classifier has not changed. A study of how the precision-recall curve responds to the ratio of positives to negatives in the test set worked out this dependence explicitly, showing how the curve shifts as that ratio changes and allowing the shift to be predicted in advance.⁠[17] The practical lesson is that precision values are comparable only when the class balance is comparable, or when the balance is stated alongside the number.

The problem is compounded when the labels used as truth are themselves imperfect. Accuracy assessment usually assumes a gold standard against which the classifier's output is compared, but such a standard often does not exist or is too costly to obtain, and the reference labels come instead from expert judgement that carries its own error. A simulation study varied both the prevalence of the positive class and the quality of the reference standard, using realistic values from applications such as remote sensing, and found that the apparent magnitude of recall, precision, specificity, F1, the Matthews correlation coefficient and several other measures was influenced greatly by both factors.⁠[14] The direction and size of the mis-estimation depended on the prevalence and on the nature of the errors in the reference labels, so the bias is not a constant that could be subtracted away. Even small errors in the reference data were enough to produce large bias, and the study noted that disagreement between expert interpreters has been recorded at up to about 25 percent in some medical research and around 30 percent in remote sensing.⁠[14] A metric computed against such labels is an assessment relative to that particular sample and that particular standard, not an objective measure of the classifier's quality.

What the curve hides

The threshold-free summaries carry their own fragility. Computing the area under a precision-recall curve requires joining the points obtained at each threshold, and the points must be connected by a non-linear interpolation rather than the straight lines used for the older ROC curve. Different interpolation schemes can yield different areas from the same set of points, and the discrepancy is largest when the points are few and far apart, which is exactly the situation with small test sets or coarse scores. A study comparing a continuous interpolation against the discrete scheme that interpolates along the true positives found that the difference between them could reach 0.03, occurring for the smallest datasets of 10 and 100 test points with at most ten distinct scores, while most absolute differences were smaller than about 0.01.⁠[8] The gap shrank toward nothing as the data grew or the scores became more finely graded. The area is therefore an estimate whose precision depends on how much data and how many distinct scores stand behind it, and software that uses a cruder interpolation can misstate it.

No single number

The recurring theme across these difficulties is that no one metric captures everything worth knowing about a classifier. Each measure answers a particular question and is blind to the rest: accuracy is dominated by the common class, precision depends on prevalence, recall ignores false alarms, F1 ignores true negatives, and the Matthews correlation coefficient, for all that it draws on all four cells, can still be inflated by prevalence and imperfect labels.⁠[14] The area under the precision-recall curve avoids being flattered by abundant true negatives but is sensitive to small changes in precision and recall when positives are extremely rare, so it is best read alongside a visual inspection of the curve rather than trusted as a lone figure.⁠[3] The reasonable practice is to report several measures together and to interpret each in light of the class balance and the quality of the reference labels, rather than to search for the single number that settles the question,.⁠[14][12]

What remains open is how to correct for these distortions rather than merely acknowledge them. Methods exist for estimating the quality of reference data and for producing error-corrected estimates of accuracy and of derived quantities such as prevalence, and the recommendation to apply them has been made repeatedly.⁠[14] How well such corrections work in practice, and how a summary measure should be adjusted when the class balance is unknown, are questions without settled answers. The measures themselves are simple fractions read off four counts; the difficulty lies in knowing what population those counts represent, how trustworthy the labels are, and which of the several questions a classifier might be asked is the one that matters for the decision at hand.

Key studies

YearStudySampleDesignFinding
2011Wu et al.⁠[4]464 radiology reports describing at least one of five findingscomparison of two search engines against a radiologist's classificationRadReportMiner reached precision 81% and recall 72%, while Google Desktop reached precision 27% and recall 87%.
2014Keilwagen et al.⁠[8]methodological study of interpolation for precision-recall curvesA continuous interpolation allows precision-recall curves and their areas to be computed for weighted data.
2015Saito & Rehmsmeier⁠[2]simulation comparing ROC, CROC, CC and PRC plotsROC plots were unchanged between balanced and imbalanced data, while PRC plots changed and were more informative.
2015Grau et al.⁠[9]software description of an R package for precision-recall and ROC curvesThe package computes PR and ROC curves and their areas for soft-labeled data using continuous interpolation.
2019Sofaer et al.⁠[12]simulated species at three levels of prevalencesimulation comparing AUC-PR and AUC-ROC as geographic extent increasedThe area under the precision-recall curve held up well when species were rare, and unlike the area under the receiver operating characteristic curve it did not change as the geographic extent of predictions grew.
2020Chicco & Jurman⁠[5]six synthetic use cases and one real genomics scenariocomparison of accuracy, F1 score and Matthews correlation coefficientIn one use case with 91 positives and 9 negatives, accuracy was 0.90 and F1 score 0.95, but MCC was -0.03.
2021Williams⁠[17]simulated 2d Gaussian data with 5000 positives and 5000 negatives, then 500 positives and 5000 negativesanalysis of how precision depends on the positive-to-negative ratioPrecision has an explicit dependence on the ratio r, and the predicted PR curve agreed well with the empirical one.
2022Fleerackers et al.⁠[1]400 news stories from 8 outletsmanual content analysis compared with automated mention dataThe service had precision 0.95, recall 0.70 and an F-score of 0.80, with recall below 0.50 for some outlets.
2024Rai et al.⁠[13]canine perivascular wall tumour images across three foldspathologists-in-the-loop annotation with threshold tuningThe best F1-score rose from 0.402 to 0.750, while mean test sensitivity fell from 0.952 to 0.803.
2025Martin et al.⁠[3]200,000 virtual pediatric patientssimulation with logistic regression, random forest and XGBoost modelsAUROCs were 0.953, 0.874 and 0.947, while AUPRCs were 0.116, 0.083 and 0.096 at an event frequency of 0.007.
2025Hemmatian et al.⁠[11]four imbalanced datasets (ILPD, QSAR, Blood, and Maternal Health Risk)comparison of oversampling methods using five metricsThe proposed method outperformed RN-SMOTE in 100% of cases, with average improvements of 1.7% in precision and 2.05% in recall.

See also

References

  1. Fleerackers, A., Nehring, L., Maggio, L. A., Enkhbayar, A., Moorhead, L., & Alperin, J. P. (2022). Identifying science in the news: An assessment of the precision and recall of Altmetric.com news mention data. Scientometrics, 127(11), 6109-6123. doi:10.1007/s11192-022-04510-7
  2. Saito, T., & Rehmsmeier, M. (2015). The Precision-Recall Plot Is More Informative than the ROC Plot When Evaluating Binary Classifiers on Imbalanced Datasets. PLOS ONE, 10(3), e0118432. doi:10.1371/journal.pone.0118432
  3. Martin, B., Bennett, T. D., DeWitt, P. E., Russell, S., & Sanchez-Pinto, L. N. (2025). Use of the Area Under the Precision-Recall Curve to Evaluate Prediction Models of Rare Critical Illness Events. Pediatric Critical Care Medicine, 26(6), e855-e859. doi:10.1097/pcc.0000000000003752
  4. Wu, A. S., Do, B. H., Kim, J., & Rubin, D. L. (2011). Evaluation of Negation and Uncertainty Detection and its Impact on Precision and Recall in Search. Journal of Digital Imaging, 24(2), 234-242. doi:10.1007/s10278-009-9250-4
  5. Chicco, D., & Jurman, G. (2020). The advantages of the Matthews correlation coefficient (MCC) over F1 score and accuracy in binary classification evaluation. BMC Genomics, 21(1). doi:10.1186/s12864-019-6413-7
  6. Buckland, M., & Gey, F. (1994). The relationship between Recall and Precision. Journal of the American Society for Information Science, 45(1), 12-19. doi:10.1002/(sici)1097-4571(199401)45:1<12::aid-asi2>3.0.co;2-l
  7. CLEVERDON, C. W. (1972). On the inverse relationship of recall and precision. Journal of Documentation, 28(3), 195-201. doi:10.1108/eb026538
  8. Keilwagen, J., Grosse, I., & Grau, J. (2014). Area under Precision-Recall Curves for Weighted and Unweighted Data. PLoS ONE, 9(3), e92209. doi:10.1371/journal.pone.0092209
  9. Grau, J., Grosse, I., & Keilwagen, J. (2015). PRROC: computing and visualizing precision-recall and receiver operating characteristic curves in R. Bioinformatics, 31(15), 2595-2597. doi:10.1093/bioinformatics/btv153
  10. Gordon, M., & Kochen, M. (1989). Recall-precision trade-off: A derivation. Journal of the American Society for Information Science, 40(3), 145-151. doi:10.1002/(sici)1097-4571(198905)40:3<145::aid-asi1>3.0.co;2-i
  11. Hemmatian, J., Hajizadeh, R., & Nazari, F. (2025). Addressing imbalanced data classification with Cluster-Based Reduced Noise SMOTE. PLOS ONE, 20(2), e0317396. doi:10.1371/journal.pone.0317396
  12. Sofaer, H. R., Hoeting, J. A., & Jarnevich, C. S. (2019). The area under the precision‐recall curve as a performance metric for rare binary events. Methods in Ecology and Evolution, 10(4), 565-577. doi:10.1111/2041-210x.13140
  13. Rai, T., Morisi, A., Bacci, B., Bacon, N. J., Dark, M. J., Aboellail, T., Thomas, S. A., La Ragione, R. M., & Wells, K. (2024). Keeping Pathologists in the Loop and an Adaptive F1-Score Threshold Method for Mitosis Detection in Canine Perivascular Wall Tumours. Cancers, 16(3), 644. doi:10.3390/cancers16030644
  14. Foody, G. M. (2023). Challenges in the real world use of classification accuracy metrics: From recall and precision to the Matthews correlation coefficient. PLOS ONE, 18(10), e0291908. doi:10.1371/journal.pone.0291908
  15. Farhadpour, S., Warner, T. A., & Maxwell, A. E. (2024). Selecting and Interpreting Multiclass Loss and Accuracy Assessment Metrics for Classifications with Class Imbalance: Guidance and Best Practices. Remote Sensing, 16(3), 533. doi:10.3390/rs16030533
  16. Nguyen, V. D., Bui, N. D., & Do, H. K. (2022). Skin Lesion Classification on Imbalanced Data Using Deep Learning with Soft Attention. Sensors, 22(19), 7530. doi:10.3390/s22197530
  17. Williams, C. K. I. (2021). The Effect of Class Imbalance on Precision-Recall Curves. Neural Computation, 33(4), 853-857. doi:10.1162/neco_a_01362

Cite this page: Atlas Nova editors. (2026). Precision and recall. Atlas Nova. https://velocer.io/atlas/precision-and-recall/