Contents
We are working on Recall, also called Sensitivity, for a binary classifier with hard predicted labels, defined by
where and are non-negative confusion-matrix counts and the denominator is strictly positive when there is at least one actual positive case. The setting is finite, unweighted binary classification, so Recall lies in , is threshold-dependent, and is especially important when missing actual positives is costly.
Deep Breakdown
Recall measures how completely a classifier captures the positive class. It answers the question: > Of all observations that are actually positive, what fraction did the model correctly predict as positive? This is a coverage metric for the positive class. If the positive class is the class we care most about finding, then Recall becomes central. In binary classification, each observation falls into one of four confusion-matrix cells:
- true positive, , predicted positive and actually positive,
- true negative, , predicted negative and actually negative,
- false positive, , predicted positive but actually negative,
- false negative, , predicted negative but actually positive.
Recall uses only two of these:
- , because these are actual positives that the model successfully found,
- , because these are actual positives that the model missed.
So Recall ignores and directly. That is intentional. Recall is not about overall correctness. It is about the model’s ability to detect actual positives. This makes Recall critical in applications where failing to detect a positive case is costly, dangerous, or strategically harmful.
Examples include:
- medical screening, where missing a disease case can delay treatment,
- churn prediction, where missing at-risk customers means lost retention opportunities,
- fraud detection, where missed fraud cases translate into financial loss,
- safety or anomaly monitoring, where missed incidents can escalate.
High Recall means the classifier misses few actual positives. Low Recall means many actual positives slip through the system undetected. But Recall alone is not enough. A classifier can achieve very high Recall by predicting positive very often. That strategy catches more real positives, but it also tends to create more false positives, which hurts Precision. This is the classic recall–precision tradeoff. Lowering a classification threshold often increases Recall but decreases Precision. Raising the threshold often increases Precision but decreases Recall. In DA/DS work, Recall matters whenever the operational objective is “do not miss important positives.” If the cost of a false negative is high, Recall often matters more than Accuracy. Still, Recall should usually be interpreted together with Precision and, when appropriate, summarized jointly by the F1 score.
Flowchart
Real-world use
Where it is used
Recall is used when a model screens, flags, detects, or prioritizes positive cases, and the business or operational risk of missing those positive cases is high. Typical examples include disease screening, churn detection, fraud monitoring, defect detection, safety alerts, and rare-event identification.
Problem it solves
It solves the problem of measuring how many real positives the model successfully captures. A business may care less about how “clean” the positive prediction list is and more about whether important true positive cases are being missed.
How it solves the problem
It takes the number of correctly identified positives, , and divides by the total number of actual positives, . This yields a proportion between and that measures the model’s coverage of the positive class.
Example in a business
Suppose a subscription company builds a churn model to identify customers likely to cancel next month. If 500 customers truly would have churned and the model correctly flagged 350 of them, then the model recovered 70% of the real churners. That is Recall. If the retention team cares strongly about not missing churn risk, Recall becomes a key evaluation metric because each false negative is a missed save opportunity.
The formula, piece by piece
| Symbol | Meaning |
|---|---|
| True positives, predicted positive and actually positive | |
| False negatives, predicted negative but actually positive | |
| Total number of actual positives | |
| Fraction of actual positives correctly predicted as positive | |
| Another standard name for Recall |
Canonical formula:
Equivalent naming:
Domain assumptions:
Range:
Undefined case:
In words, Recall is undefined when there are no actual positive cases in the dataset. In software libraries, this case may be handled by returning , returning NaN, or using a configurable convention.
The formula in words
Recall looks only at the observations that are actually positive and asks how many of them the model successfully found. The numerator, , counts the actual positives that were correctly predicted as positive. The denominator, , counts all actual positives, both the ones found and the ones missed. A high Recall means the model captures most real positive cases. A low Recall means the model misses many of them. Recall does not directly tell us whether the model’s positive predictions are trustworthy. That is Precision’s role. So Recall tells us the coverage of real positives, not the purity of predicted positives.
Critical Concepts
- Recall is conditional on actual positive. It asks about capture rate within the actual positive class.
- Recall is threshold-dependent. Changing the hard-label threshold changes and , which changes Recall.
- Recall improves when false negatives decrease, holding fixed. This is why it matters when missed positives are costly.
- High Recall does not imply high Precision. A model can predict positive very broadly and catch many real positives while also generating many false alarms.
- Recall–Precision tradeoff is central. Improving one often worsens the other as the threshold changes.
- F1 combines Recall and Precision. It is useful when both finding positives and keeping positive predictions reliable matter.
- Recall ignores true negatives. This makes it valuable for positive-case coverage, but it does not summarize total model performance.
Step-by-step calculation (tiny example)
Suppose a medical screening model is evaluated on 12 patients who actually have the condition or do not. Among the patients who actually have the condition:
- , correctly identified positive patients,
- , missed positive patients.
Step 1, count actual positives Actual positives are all observations that truly belong to the positive class
So there are 10 real positive cases.
Step 2, count found positives Correctly found positive cases are the true positives
Step 3, divide found positives by all actual positives
Step 4, convert to percentage if desired
Interpretation Of all truly positive cases, the model correctly identifies 70%.
Tiny plain-language reading
When there is a real positive case, the model catches it about 7 times out of 10.
Why this is not enough by itself
A model could achieve very high Recall by predicting positive almost all the time. That would reduce missed positives, but it could create many false positives. So high Recall alone does not guarantee efficient or precise decision-making.
Code examples
Beginner friendly Example [Python])
# Recall from confusion-matrix counts
# Example: churn prediction
tp = 42
fn = 18
actual_positive_count = tp + fn
recall = tp / actual_positive_count
print("True positives:", tp)
print("False negatives:", fn)
print("Actual positives:", actual_positive_count)
print("Recall:", recall)
print("Recall (%):", recall * 100)Explanation :
tpis the number of actual positives correctly found.fnis the number of actual positives missed.tp + fnis the total number of actual positives.- Dividing
tpbytp + fngives Recall.
Manual check:
So Recall is .
Beginner friendly Example [R])
# Recall from confusion-matrix counts
# Example: disease screening
tp <- 36
fn <- 9
actual_positive_count <- tp + fn
recall <- tp / actual_positive_count
cat("True positives:", tp, "\n")
cat("False negatives:", fn, "\n")
cat("Actual positives:", actual_positive_count, "\n")
cat("Recall:", recall, "\n")
cat("Recall (%):", recall * 100, "\n")Explanation :
tpis the number of actual positive cases detected.fnis the number of actual positive cases missed.recallmeasures how much of the positive class is recovered.
Manual check:
So Recall is .
Final Professional Example [Python])
from __future__ import annotations from dataclasses import dataclass RANDOM_SEED = 42 @dataclass(frozen=True)
class ConfusionMatrix: tp: int tn: int fp: int fn: int def predicted_positive_count(self) -> int: return self.tp + self.fp def actual_positive_count(self) -> int: return self.tp + self.fn def total_count(self) -> int: return self.tp + self.tn + self.fp + self.fn def recall_score_from_confusion_matrix(conf_matrix: ConfusionMatrix) -> float: actual_positive_count = conf_matrix.actual_positive_count() if actual_positive_count == 0: raise ValueError("Recall is undefined when TP + FN = 0.") return conf_matrix.tp / actual_positive_count def precision_score_from_confusion_matrix(conf_matrix: ConfusionMatrix) -> float: predicted_positive_count = conf_matrix.predicted_positive_count() if predicted_positive_count == 0: return 0.0 return conf_matrix.tp / predicted_positive_count def f1_score_from_confusion_matrix(conf_matrix: ConfusionMatrix) -> float: precision_value = precision_score_from_confusion_matrix(conf_matrix) recall_value = recall_score_from_confusion_matrix(conf_matrix) if precision_value + recall_value == 0: return 0.0 return 2 * precision_value * recall_value / (precision_value + recall_value) def accuracy_score_from_confusion_matrix(conf_matrix: ConfusionMatrix) -> float: total_count = conf_matrix.total_count() if total_count == 0: raise ValueError("Accuracy is undefined when there are no observations.") return (conf_matrix.tp + conf_matrix.tn) / total_count def summarize_model(label: str, conf_matrix: ConfusionMatrix) -> None: recall_value = recall_score_from_confusion_matrix(conf_matrix) precision_value = precision_score_from_confusion_matrix(conf_matrix) f1_value = f1_score_from_confusion_matrix(conf_matrix) accuracy_value = accuracy_score_from_confusion_matrix(conf_matrix) print(f"Model: {label}") print( f"TP={conf_matrix.tp}, TN={conf_matrix.tn}, " f"FP={conf_matrix.fp}, FN={conf_matrix.fn}" ) print(f"Actual positives={conf_matrix.actual_positive_count()}") print(f"Recall={recall_value:.4f}") print(f"Precision={precision_value:.4f}") print(f"F1={f1_value:.4f}") print(f"Accuracy={accuracy_value:.4f}") print("-" * 40) def main() -> None: # Churn detection example: # Conservative threshold misses more churners, so Recall is lower. # Broad threshold catches more churners, so Recall is higher. conservative_model = ConfusionMatrix(tp=55, tn=860, fp=25, fn=60) broad_capture_model = ConfusionMatrix(tp=92, tn=760, fp=125, fn=23) summarize_model("Conservative Threshold", conservative_model) summarize_model("Broad Capture Threshold", broad_capture_model) if __name__ == "__main__": main()What this professional example teaches:
- Recall is computed only from and .
- A broader threshold often increases Recall by reducing missed positives.
- That same broader threshold can lower Precision by generating more false positives.
- The conservative threshold may keep the positive list cleaner, but it can miss many real positives.
- F1 is useful when both positive-class coverage and positive prediction quality matter.
Accuracy is included to show that overall correctness can hide weak positive-class recovery. Plain-English interpretation of the churn example:
- The conservative model contacts fewer customers and misses many real churners.
- The broad-capture model recovers many more churners but also targets more non-churners.
- The better choice depends on the cost of missed churners versus the cost of unnecessary outreach.
Self-check: mathematical verification
Re-derivation from the definition of actual-positive coverage Among all observations that are actually positive, there are only two relevant possibilities
- the model correctly predicts positive, counted in ,
- the model incorrectly predicts negative, counted in .
Therefore, the total number of actual positives is:
The number of actual positives successfully captured is:
So the fraction of actual positives recovered by the classifier is:
This matches the canonical formula exactly.
Bounds check
Because counts are non-negative:
If , dividing through gives:
So the stated range is correct.
Undefined case check
If there are no actual positive cases in the dataset, then:
and the denominator is zero, so Recall is mathematically undefined. This is a domain issue, not a formula error.
Sanity checks
- If every actual positive is found, then and , so:
- If no actual positive is found, then and , so:
- If half of actual positives are found, then:
and therefore:
These sanity checks are coherent.
Verbal-to-algebra consistency
The verbal explanation says Recall is “of all actual positives, the fraction the model predicts positive.” Algebraically, the denominator counts all actual positives and the numerator counts those correctly predicted as positive. The wording and the formula are aligned.
Structural verification
- Opening restatement paragraph is present.
- All required sections are present and non-empty.
- Block equations use `
`.
- Symbol-table entries use math mode such as
$TP$and$FN$. - Mermaid uses
flowchart TDand node text in["..."]. - Three code blocks are present: Python beginner, R beginner, Python professional.
- Precision, F1, and the recall–precision tradeoff are explicitly discussed.
- No placeholder text remains.
Common Pitfalls and Edge Cases
- No actual positives: Recall is undefined when .
- High Recall with low Precision: A classifier can achieve excellent Recall by predicting positive very often.
- Threshold dependence: Recall can change sharply when the hard-label threshold changes.
- Ignoring false-positive burden: Optimizing Recall too aggressively can overload operations with false alarms.
- Confusing Recall with Precision: Recall concerns actual positives; Precision concerns predicted positives.
- Comparing across datasets without context: Recall depends on thresholding and the difficulty of the positive class.
- Instability with few actual positives: When is small, Recall can vary substantially with a few cases.
- Operational mismatch: In some workflows, extremely high Recall may be impossible or too expensive to sustain.
- Overlooking F1 or business costs: High Recall is not automatically optimal if false positives are also costly.
References and Standard Results
- Confusion matrix definition for binary classification
- Recall definition as true positive rate
- Sensitivity as a standard synonym for Recall
- Non-negativity of confusion-matrix counts
- Partition of actual positives into and
- Bound result that a ratio of part-to-whole lies in
- Standard classification metrics: Precision and F1 score
- Recall–Precision tradeoff under threshold variation
- Threshold dependence of hard-label classification metrics