{
  "id": "precision-and-recall",
  "title": "Precision and Recall",
  "lang": "en",
  "source_lang": "en",
  "summary": "Precision and recall measure the reliability and completeness of positive predictions, forming central tools for evaluating retrieval systems, classifiers, and ranked results.",
  "category": "mathematics",
  "subcategory": "probability-statistics",
  "type": "concept",
  "aliases": [
    "Precision–recall measures",
    "positive predictive value and sensitivity"
  ],
  "generated_at": "2026-11-02",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/precision-and-recall/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/precision-and-recall/",
      "json": "https://aiwiki.page/zh/precision-and-recall.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "Precision and recall are complementary measures of the performance of a system that selects items or assigns them to a positive category. Precision is the proportion of selected items that are genuinely positive; recall is the proportion of genuinely positive items that the system selects. A search engine has high precision when its retrieved documents are mostly relevant, and high recall when it retrieves most of the relevant documents available. The same distinction applies to classification, anomaly detection, record matching, and many other tasks in machine learning and statistics.\n\nThe measures answer different questions and therefore cannot generally substitute for each other. A system may achieve high precision by returning only a few exceptionally reliable results while overlooking many positives. Conversely, it may achieve complete recall by selecting everything, at the cost of including many irrelevant items. Their interpretation depends on the definition of a positive case, the population being evaluated, and the decision rule used to produce predictions.\n\nPrecision and recall can describe a single operating point, a ranked list, or a family of decisions obtained by changing a threshold. They also underpin measures such as the F-score and average precision. Their mathematical relationships with class prevalence, error rates, and decision costs explain both their usefulness and the limitations of comparisons based on them."
    },
    {
      "heading": "Definitions and the confusion matrix",
      "text": "For binary classification, each item has a reference label and a predicted label, conventionally called positive and negative. Comparing the two labels gives four counts: true positives, \\(TP\\), are positive items predicted positive; false positives, \\(FP\\), are negative items predicted positive; false negatives, \\(FN\\), are positive items predicted negative; and true negatives, \\(TN\\), are negative items predicted negative. These counts form a confusion matrix. “Positive” denotes the category of interest, not necessarily a desirable outcome: fraudulent transactions, damaged components, or unwanted messages may all be positive cases.\n\nThe definitions are\n\n\\[\\operatorname{Precision}=\\frac{TP}{TP+FP}, \\qquad \\operatorname{Recall}=\\frac{TP}{TP+FN}.\\]\n\nBoth measures lie between zero and one when their denominators are positive. Precision conditions on the system’s selections, whereas recall conditions on the reference positives. If \\(Y\\) is the reference label and \\(\\widehat{Y}\\) is the prediction, their population counterparts are conditional probabilities:\n\n\\[\\operatorname{Precision}=\\Pr(Y=1\\mid\\widehat{Y}=1), \\qquad \\operatorname{Recall}=\\Pr(\\widehat{Y}=1\\mid Y=1).\\]\n\nIn diagnostic-test terminology, precision is positive predictive value, and recall is sensitivity or the true positive rate. These names emphasize different applications but express the same mathematical ratios.\n\nA set-based formulation is especially natural for retrieval. Let \\(A\\) be the set of selected items and \\(B\\) the set of relevant items. Then\n\n\\[\\operatorname{Precision}=\\frac{|A\\cap B|}{|A|}, \\qquad \\operatorname{Recall}=\\frac{|A\\cap B|}{|B|}.\\]\n\nFor example, suppose a collection contains 200 relevant documents. A system retrieves 120 documents, of which 90 are relevant. Its precision is \\(90/120=0.75\\), and its recall is \\(90/200=0.45\\). The 30 irrelevant retrieved documents affect precision; the 110 relevant documents not retrieved affect recall. The number of irrelevant documents not retrieved does not enter either expression.\n\nZero denominators require explicit conventions. Precision is undefined if the system predicts no positives, and recall is undefined if the evaluation set contains no reference positives. Software may return zero, a missing value, or another documented value in these cases. Such choices affect averages across labels or queries, particularly for rare categories. A reported zero may therefore mean either observed failure or an empty denominator, two situations with different interpretations. Confusion-matrix counts make that distinction visible."
    },
    {
      "heading": "Origins in information retrieval and subsequent adoption",
      "text": "Precision and recall became established evaluation concepts in information retrieval, where the central problem was selecting useful documents from a larger collection. Their development was closely associated with mid-twentieth-century efforts to compare indexing languages, cataloguing methods, and document-search procedures experimentally. Allen Kent and colleagues used precision and recall terminology in a 1955 paper on evaluating information-retrieval systems. The distinction captured a practical problem that a single count of retrieved documents could not resolve: a system could return many documents without returning useful ones.\n\nThe Cranfield experiments, conducted under Cyril Cleverdon during the late 1950s and 1960s, helped establish controlled retrieval evaluation. Collections of documents, test questions, and relevance assessments allowed competing methods to be compared against a shared reference. Recall measured how much relevant material was found, while precision measured how much irrelevant material accompanied it. This framework encouraged evaluation of complete retrieval systems rather than isolated indexing procedures, and it made the definition and assessment of relevance integral parts of experimental design.\n\nLater work connected retrieval effectiveness with formal models of ranking and with combined measures. C. J. van Rijsbergen’s 1979 book Information Retrieval discussed effectiveness measures that helped establish the family now commonly expressed as F-measures. The Text REtrieval Conference, first held in 1992, expanded shared evaluation through large test collections, common tasks, and relevance judgments. Measures derived from precision and recall, including average precision, became standard tools for comparing document-ranking systems.\n\nAs statistical classification and machine learning expanded, the same measures were adopted under a different vocabulary. A retrieved document became a positive prediction, a relevance judgment became a reference label, and a search cutoff became a classification threshold. The mathematics transferred directly, but the evaluation setting often changed. A fixed binary classifier produces one pair of values; a search engine naturally produces a ranking; and an object detector produces scored candidate regions whose correctness depends on a matching rule.\n\nThese historical differences continue to matter. Retrieval studies often average performance across queries, giving each information need equal importance. Classification studies may instead pool predictions across all examples, giving common classes or large groups greater influence. Two results both called “precision” can therefore represent different units of analysis. The measure’s name alone does not identify whether documents, queries, labels, entities, or detection events were counted."
    },
    {
      "heading": "Class prevalence, specificity, and accuracy",
      "text": "Precision depends on how common positive cases are in the evaluated population. Let \\(\\pi=\\Pr(Y=1)\\) denote prevalence, \\(r\\) denote recall, and \\(f=\\Pr(\\widehat{Y}=1\\mid Y=0)\\) denote the false positive rate. Applying Bayes’ theorem gives\n\n\\[\\operatorname{Precision} = \\frac{\\pi r}{\\pi r+(1-\\pi)f}.\\]\n\nThis identity separates three influences: the frequency of positives, the fraction of positives detected, and the fraction of negatives incorrectly selected. Even a small false positive rate can generate many false positives when negatives greatly outnumber positives.\n\nFor example, consider a classifier with recall \\(0.90\\) and false positive rate \\(0.01\\). At prevalence \\(0.01\\), its precision is\n\n\\[\\frac{0.01(0.90)} {0.01(0.90)+0.99(0.01)} \\approx 0.476.\\]\n\nIn a population of 10,000 items, this corresponds to 90 true positives and 99 false positives. At prevalence \\(0.10\\), the same conditional rates produce 900 true positives and 90 false positives, giving precision approximately \\(0.909\\). The classifier’s sensitivity and false positive rate have not changed, but the interpretation of a positive prediction has changed substantially.\n\nSpecificity is the true negative rate,\n\n\\[\\operatorname{Specificity}=\\frac{TN}{TN+FP}=1-f,\\]\n\nwhereas accuracy is the fraction of all predictions that are correct:\n\n\\[\\operatorname{Accuracy} = \\frac{TP+TN}{TP+FP+FN+TN} = \\pi r+(1-\\pi)(1-f).\\]\n\nAccuracy may be high even when a classifier detects none of the positives. If only one item in 1,000 is positive, predicting every item negative produces accuracy \\(0.999\\) and recall zero. Precision is undefined because there are no positive predictions. This example explains why precision and recall are widely used for imbalanced classification, although they do not by themselves characterize every aspect of performance.\n\nThe omission of true negatives is both a strength and a limitation. Adding correctly rejected irrelevant documents to a collection leaves precision and recall unchanged, which is often desirable in retrieval. Nevertheless, a pair of precision and recall values does not reveal the volume of negative cases or the false positive rate. Changing which class is called positive also changes both measures; neither is symmetric under label reversal.\n\nThe observed fraction of false selections is \\(FP/(TP+FP)=1-\\operatorname{Precision}\\). This quantity is the realized false discovery proportion. In multiple testing, the false discovery rate is an expectation of a suitably defined false discovery proportion across repeated realizations. The distinction between an observed ratio and its expected value prevents a simple classification statistic from being confused with an error-control guarantee."
    },
    {
      "heading": "Thresholds and precision–recall curves",
      "text": "Many systems produce a score \\(s(x)\\), rather than only a class label. A decision rule predicts positive when \\(s(x)\\geq t\\), where \\(t\\) is a threshold. Changing \\(t\\) changes the selected set and therefore the confusion-matrix counts. Lowering the threshold includes more items: true positives and false positives can only increase, while false negatives can only decrease. Recall consequently cannot decrease. Precision, however, need not decrease monotonically, because newly included items may have a higher or lower positive fraction than the items already selected.\n\nA precision–recall curve plots precision against recall as the threshold varies, conventionally placing recall on the horizontal axis. For a finite sample, the underlying operating points form a discrete sequence. Equal scores enter together if classification uses a common threshold, so tied scores may create jumps involving several items. At the threshold that selects everything, recall is one and precision equals the positive prevalence, provided the sample contains positives. At the threshold that selects nothing, precision is undefined; plotting software often inserts an endpoint such as precision one at recall zero for display or integration purposes.\n\nConsider a ranking whose first five reference labels are positive, negative, positive, negative, positive. Successive prefixes have precision values \\(1\\), \\(1/2\\), \\(2/3\\), \\(1/2\\), and \\(3/5\\). Precision rises whenever the newly included item is positive and falls whenever it is negative. If these are the only three positives, recall progresses through \\(1/3\\), \\(1/3\\), \\(2/3\\), \\(2/3\\), and \\(1\\). This produces the jagged shape characteristic of empirical precision–recall plots.\n\nThe receiver operating characteristic, or ROC curve, describes the same thresholds using false positive rate and true positive rate. For a fixed prevalence, its coordinates can be converted to precision–recall coordinates:\n\n\\[P=\\frac{\\pi R}{\\pi R+(1-\\pi)F},\\]\n\nwhere \\(R\\) is recall and \\(F\\) is false positive rate. Precision–recall plots make false positives conspicuous when the positive class is rare, whereas a large negative denominator can make the corresponding ROC false positive rate appear small. Neither display contains information about error costs unless such information is supplied separately.\n\nInterpolation must respect the coordinate system. A straight line between two ROC points does not generally become a straight line between the corresponding precision–recall points. Randomizing between decision rules mixes expected confusion counts linearly, but precision remains a ratio of those mixed counts. Consequently, drawing straight segments in a precision–recall plot, interpolating an upper precision envelope, and evaluating actual threshold decisions are distinct operations that can yield different area summaries."
    },
    {
      "heading": "F-scores and other combined measures",
      "text": "The most widely used scalar combination of precision and recall is the F-score. For nonnegative precision \\(P\\) and recall \\(R\\), the usual \\(F_1\\) score is their harmonic mean:\n\n\\[F_1=\\frac{2PR}{P+R} =\\frac{2TP}{2TP+FP+FN},\\]\n\nwhen the relevant denominator is positive. The harmonic mean gives a low result when either component is low. Precision \\(0.90\\) and recall \\(0.10\\), for example, produce an arithmetic mean of \\(0.50\\) but an \\(F_1\\) score of \\(0.18\\). This makes \\(F_1\\) unsuitable for systems that achieve one objective while largely neglecting the other.\n\nThe generalized measure is\n\n\\[F_\\beta = \\frac{(1+\\beta^2)PR}{\\beta^2P+R} = \\frac{(1+\\beta^2)TP} {(1+\\beta^2)TP+\\beta^2FN+FP}, \\qquad \\beta>0.\\]\n\nValues \\(\\beta>1\\) emphasize recall, while values below one emphasize precision. For instance, \\(F_2\\) assigns the false-negative term four times the coefficient of the false-positive term in the count-based denominator. This algebraic weighting is not equivalent to a universal statement about economic or practical error costs. The relationship between an optimal threshold and an application’s costs also depends on prevalence, probability estimates, and the available decisions.\n\nF-scores omit true negatives, as precision and recall do. They can therefore remain unchanged when many correctly rejected negatives are added to an evaluation set. They also treat the designated positive class specially: reversing positive and negative labels usually changes the score. A single F-score conceals the balance between its components; precision \\(0.50\\) and recall \\(1.00\\) yield the same \\(F_1\\) as precision \\(1.00\\) and recall \\(0.50\\). These systems may impose very different workloads or miss very different numbers of relevant items.\n\nA closely related set measure is the Jaccard index,\n\n\\[J=\\frac{TP}{TP+FP+FN}.\\]\n\nFor the same pooled counts,\n\n\\[F_1=\\frac{2J}{1+J}, \\qquad J=\\frac{F_1}{2-F_1}.\\]\n\nThus, \\(F_1\\) and Jaccard similarity order systems identically when computed from the same single confusion matrix, even though their numerical values differ. That equivalence does not necessarily survive averaging over examples or classes, because averaging and nonlinear transformation do not commute.\n\nOptimizing an F-score is a mathematical optimization problem over a ratio of aggregate quantities, not simply the minimization of an independent per-example error. The best threshold may depend on the distribution of scores across the evaluated population. Selecting that threshold on a validation set and estimating its performance on separate data distinguishes model selection from final evaluation; using the test labels for both steps introduces optimistic selection effects."
    },
    {
      "heading": "Ranked retrieval, average precision, and area summaries",
      "text": "In ranked retrieval, the order of results matters because users or downstream processes often inspect only a prefix. Precision at rank \\(k\\), written \\(P@k\\), is the number of relevant items among the first \\(k\\) results divided by \\(k\\). Recall at rank \\(k\\), \\(R@k\\), divides the same count by the total number of relevant items. If a collection contains 40 relevant documents and six appear in the first ten results, then \\(P@10=0.6\\) and \\(R@10=0.15\\). Precision at a fixed cutoff measures the quality of a limited inspection budget, not the completeness of retrieval.\n\nAverage precision, or AP, combines precision values at ranks where relevant items occur. With binary relevance, a ranked list of \\(n\\) items, and \\(M>0\\) relevant items in the evaluation universe, a standard definition is\n\n\\[AP=\\frac{1}{M}\\sum_{k=1}^{n}P@k\\,\\operatorname{rel}(k),\\]\n\nwhere \\(\\operatorname{rel}(k)\\) is one if the item at rank \\(k\\) is relevant and zero otherwise. Relevant items omitted from a truncated ranking contribute zero through the denominator. If the relevant items occur at ranks 1, 3, and 5 and there are three relevant items altogether, then\n\n\\[AP=\\frac{1+\\frac23+\\frac35}{3}\\approx0.756.\\]\n\nThis measure rewards placing relevant items early because early relevant items tend to have high prefix precision.\n\nA noninterpolated threshold-based expression is\n\n\\[AP=\\sum_j(R_j-R_{j-1})P_j,\\]\n\nwith precision evaluated at the corresponding recall increases. With distinct scores and a complete ranking, this agrees with the rank-based expression. Tied scores complicate the correspondence: evaluating tied items as a group can differ from arbitrarily ordering them. AP therefore requires a defined treatment of ties as well as a definition of the relevant-item denominator.\n\nThe expression “area under the precision–recall curve” is not a unique computational specification. Trapezoidal integration linearly joins observed points; noninterpolated AP uses precision-weighted recall increments; interpolated AP may first replace precision with the highest precision attainable at that recall or a greater recall. Historical retrieval evaluations used precision sampled at eleven standard recall levels, while other benchmarks use denser grids. These procedures can yield different values for the same ranking.\n\nMean average precision, or mAP, typically averages AP over queries, classes, or detection categories, but the averaging unit is application-specific. Its interpretation also depends on relevance judgments: treating unjudged documents as nonrelevant can disadvantage systems that retrieve relevant material outside an assessment pool. Precision–recall figures commonly include a horizontal prevalence line as a no-skill population reference. Finite-sample expected AP for a randomly ordered list is not, in general, exactly equal to prevalence, so that reference should not be mistaken for an exact finite-sample identity."
    },
    {
      "heading": "Multiclass and multilabel evaluation",
      "text": "For a problem with more than two classes, precision and recall are commonly calculated by treating each class in turn as positive and all remaining classes as negative. Class \\(c\\) has counts \\(TP_c\\), \\(FP_c\\), and \\(FN_c\\), giving class-specific precision and recall. These values reveal distinctions concealed by a single overall accuracy: a classifier may identify a common class reliably while missing most members of a rare class, or it may overpredict one class and consequently have low precision for that class.\n\nMacro averaging assigns each class equal weight:\n\n\\[P_{\\mathrm{macro}}=\\frac{1}{C}\\sum_{c=1}^{C}P_c, \\qquad R_{\\mathrm{macro}}=\\frac{1}{C}\\sum_{c=1}^{C}R_c.\\]\n\nThis makes rare classes influential, but their estimates may be unstable if they contain few examples. Undefined class-specific precision or recall also requires a convention. Weighted macro averages instead weight classes, commonly by reference support \\(TP_c+FN_c\\). Such weighting reflects class frequency but may hide poor performance on infrequent categories.\n\nMicro averaging first pools counts:\n\n\\[P_{\\mathrm{micro}} = \\frac{\\sum_c TP_c}{\\sum_c(TP_c+FP_c)}, \\qquad R_{\\mathrm{micro}} = \\frac{\\sum_c TP_c}{\\sum_c(TP_c+FN_c)}.\\]\n\nFor a single-label multiclass problem in which every example receives exactly one predicted class and all classes are included, micro precision, micro recall, and accuracy are equal. Every incorrect prediction creates one false positive for the predicted class and one false negative for the true class. This equality need not hold when a subset of classes is evaluated, predictions can abstain, or multiple labels are permitted.\n\nIn multilabel classification, an example may have several valid labels. Evaluation can pool all example–label decisions, average by label, or average separately computed measures over examples. These choices answer different questions. Label-macro recall emphasizes coverage of each label; example-averaged recall emphasizes the proportion of each example’s labels recovered; micro recall emphasizes the total number of recovered label assignments. Examples with empty true or predicted label sets introduce additional denominator conventions.\n\nF-score averaging requires particular care. The mean of class-specific F-scores,\n\n\\[\\frac{1}{C}\\sum_c F_{1,c},\\]\n\nis generally not the F-score calculated from macro precision and macro recall. For example, if two classes have precision–recall pairs \\((1,0.1)\\) and \\((0.1,1)\\), their mean class-specific \\(F_1\\) is about \\(0.182\\), whereas the F-score of macro precision \\(0.55\\) and macro recall \\(0.55\\) is \\(0.55\\). Reports using the term “macro F1” therefore need a precise averaging definition, especially when comparing implementations or reproducing published results."
    },
    {
      "heading": "Matching rules in detection and structured prediction",
      "text": "In many applications, reference items and predictions are not naturally aligned one to one. A document classifier evaluates a fixed collection of items, but an object detector proposes regions at arbitrary locations. A named-entity recognizer proposes spans of text, and an event detector proposes intervals in a signal. Before precision and recall can be counted, an evaluation protocol must specify which predictions match which reference objects.\n\nObject detection commonly uses intersection over union,\n\n\\[IoU(A,B)=\\frac{|A\\cap B|}{|A\\cup B|},\\]\n\nto compare a predicted region \\(A\\) with a reference region \\(B\\). A prediction may count as correct only if its class agrees and its overlap exceeds a specified threshold. Matching is normally one to one: once a reference object is assigned to a detection, additional detections of the same object are false positives rather than additional true positives. An undetected reference object contributes a false negative. The overlap threshold, matching order, and treatment of difficult or ignored regions consequently affect the resulting measures.\n\nBenchmark conventions make these choices concrete. PASCAL Visual Object Classes detection evaluations commonly used an overlap threshold of \\(0.5\\). The COCO detection benchmark summarizes AP across overlap thresholds from \\(0.50\\) to \\(0.95\\) in increments of \\(0.05\\), alongside additional breakdowns. A detector that approximately localizes many objects can therefore perform well under a loose overlap rule yet less well when precise localization is required. Detection AP is not determined by class ranking alone; it also incorporates localization and matching.\n\nText extraction presents a related problem. Under exact-span evaluation, an entity prediction is correct only if both its boundaries and its category match a reference entity. Predicting “New York” when the reference span is “New York City” may count as one false positive and one false negative despite substantial token overlap. Token-level precision and recall would give partial credit. Neither convention is intrinsically interchangeable with the other: entity-level scoring measures complete extracted units, whereas token-level scoring measures labeled text positions.\n\nOther tasks require still different units. Duplicate-record detection may count matched record pairs, resulting clusters, or recovered underlying entities. Anomaly detection in time series may count individual timestamps or entire events, with rules governing detection delays and repeated alarms. A long event can dominate pointwise recall while contributing only one unit to eventwise recall. The matching rule is therefore part of the mathematical definition of the reported statistic, not merely an implementation detail. Comparisons across systems are meaningful only when reference units, matching criteria, and aggregation procedures coincide."
    },
    {
      "heading": "Sampling uncertainty and evaluation design",
      "text": "Observed precision and recall estimate performance in a population; they are not fixed properties of a model independent of data. Under independent sampling and a fixed classifier, recall can be analyzed as a proportion among reference-positive observations. Conditional on \\(n_+=TP+FN\\), the true-positive count has a binomial distribution under a common-success-probability model. Precision has an analogous conditional interpretation among \\(m=TP+FP\\) predicted-positive observations. These models support interval estimation, although their independence and sampling assumptions must fit the application.\n\nA simple large-sample standard error for an estimated proportion \\(\\widehat p\\) based on \\(n\\) relevant trials is\n\n\\[\\operatorname{SE}(\\widehat p) \\approx \\sqrt{\\frac{\\widehat p(1-\\widehat p)}{n}}.\\]\n\nFor recall, \\(n\\) is the number of actual positives; for precision, it is the number of predicted positives. This distinction explains why a large overall test set may still yield an uncertain recall estimate when positives are rare. Normal-approximation intervals can behave poorly with small denominators or proportions near zero or one. Wilson or exact binomial confidence intervals address some of these problems under the binomial model.\n\nDependencies require a different treatment. Several documents may belong to the same query, many images to the same source, or repeated measurements to the same subject. Resampling individual observations can then understate uncertainty. Bootstrap sampling at the level of independent clusters—such as queries or subjects—can preserve important dependencies. Comparing two systems on the same examples is also a paired problem: uncertainty depends on how their errors overlap, not just on their separate scores.\n\nEvaluation sampling can alter the target quantity. Deliberately selecting equal numbers of positives and negatives may provide useful estimates of class-conditional rates, but the resulting raw precision corresponds to the artificial class mixture. Precision in a deployment population requires its prevalence, or appropriate sampling weights. More generally, a change in the composition of positives or negatives can change recall and false positive rate as well; prevalence adjustment alone is justified only when the relevant class-conditional behavior transfers.\n\nThreshold selection and other tuning decisions introduce additional uncertainty and selection effects. Cross-validation estimates performance through repeated train–test separations, but tuning a threshold on the same held-out predictions used for final reporting still favors that sample. Separate validation and test stages, or an appropriately nested evaluation design, distinguish selection from assessment. Incomplete reference labels introduce another problem: an apparent false positive may be an unrecorded true case, while missed positives outside the labeled set remain invisible. Interval estimates quantify sampling variation under a specified model, not systematic errors in the reference standard."
    },
    {
      "heading": "Decision costs, calibration, and limits of interpretation",
      "text": "Precision and recall describe outcomes, but neither specifies the value of those outcomes. A system with precision \\(0.95\\) and recall \\(0.20\\) cannot be declared universally better or worse than one with precision \\(0.70\\) and recall \\(0.80\\). The first produces a cleaner selected set; the second recovers more positives. Which operating point is useful depends on the consequences of false positives and false negatives, the cost of inspecting selections, and any capacity constraints. These considerations belong to decision theory rather than to the metric definitions themselves.\n\nFor a simple binary decision problem, let \\(p=\\Pr(Y=1\\mid x)\\) be a calibrated probability, \\(C_{FP}\\) the cost of a false positive, and \\(C_{FN}\\) the cost of a false negative, with correct decisions assigned zero cost. The expected cost of predicting positive is \\(C_{FP}(1-p)\\); that of predicting negative is \\(C_{FN}p\\). The cost-minimizing rule predicts positive when\n\n\\[p>\\frac{C_{FP}}{C_{FP}+C_{FN}},\\]\n\nwith either decision permissible at equality. This threshold follows from the specified loss function. It generally differs from the threshold maximizing \\(F_1\\), which optimizes an aggregate ratio rather than that additive expected cost.\n\nPrecision–recall performance also differs from probability calibration. Calibration concerns whether predictions assigned probability \\(p\\) are positive with frequency \\(p\\). Ranking measures concern ordering. A strictly increasing transformation of scores preserves their ranking and therefore preserves rank-based AP and the set of threshold-achievable precision–recall points, subject to ties. Yet such a transformation can substantially alter the numerical meaning of the scores. A model can rank examples well while assigning unreliable probabilities, or be reasonably calibrated while offering limited discrimination.\n\nAggregate values can conceal differences across groups, regions, time periods, or operating conditions. Equal recall across groups does not imply equal precision, particularly when their prevalences differ. Likewise, equal precision does not imply equal false positive rates. The prevalence identity makes these distinctions mathematical rather than merely terminological. Group-specific analysis also faces sampling constraints: apparent differences may be uncertain when the relevant positive or predicted-positive counts are small.\n\nA reproducible precision–recall result therefore identifies the positive category, evaluation population, reference-label process, threshold or ranking convention, matching rules, averaging method, and treatment of undefined cases. Counts and denominators supply information that ratios alone omit, while uncertainty estimates distinguish stable differences from sampling variation. In changing environments, repeated evaluation at fixed definitions can reveal whether deterioration arises from altered prevalence, reduced recovery of positives, increased false selections, or changes in the composition of the evaluated cases."
    }
  ],
  "links": [
    "machine-learning",
    "statistics",
    "confusion-matrix",
    "conditional-probability",
    "information-retrieval",
    "bayes-theorem",
    "multiple-testing",
    "false-discovery-rate",
    "precision-recall-curve",
    "f-score",
    "mathematical-optimization",
    "multilabel-classification",
    "object-detection",
    "time-series",
    "binomial-distribution",
    "confidence-interval",
    "bootstrap-sampling",
    "cross-validation",
    "decision-theory",
    "loss-function",
    "probability-calibration"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}