Machine LearningClassification Evaluation

What is recall?

Recall measures the fraction of actual positive cases that a classifier correctly identifies as positive. It answers: *“Of all cases that truly matter, how many did the model find?”*

Formula

Recall = TP / (TP + FN)
  • TP (true positives): actual positives correctly detected.
  • FN (false negatives): actual positives the model missed.
  • TP + FN: the total number of actual positives, regardless of prediction.

Recall is also called sensitivity or true positive rate (TPR). For a fixed binary classification threshold, it ranges from 0 to 1 (0%–100%).

Worked example: screening for defective parts

A factory actually produces 50 defective parts. Its inspection model:

  • Flags 45 defective parts correctly (TP = 45).
  • Misses 5 defective parts (FN = 5).
Recall = 45 / (45 + 5)
       = 45 / 50
       = 0.90 = 90%

Interpretation: the model detects 9 out of every 10 defective parts in this sample. The other 10% slip through. The number of non-defective parts incorrectly flagged (false positives) does not appear in the recall formula.

Why is recall important?

Recall matters especially when missing a real positive case is costly:

  • Disease screening: missing a condition can delay follow-up care.
  • Fraud detection: missed fraud can cause financial loss.
  • Equipment failure detection: missed warning signs may lead to downtime.

High recall does not mean positive predictions are usually correct: a classifier can label nearly everything positive, catching all real positives while also generating many false alarms. Precision describes that other aspect.

Python example

PYTHON
from sklearn.metrics import recall_score, confusion_matrix # Positive class = 1 (defective) # TP=45, FN=5, FP=10, TN=40 y_true = [1]*45 + [1]*5 + [0]*10 + [0]*40 y_pred = [1]*45 + [0]*5 + [1]*10 + [0]*40 print(recall_score(y_true, y_pred, pos_label=1)) # 0.9 print(confusion_matrix(y_true, y_pred, labels=[0, 1])) # [[40 10] # [ 5 45]]

Common pitfalls

  • Recall is not precision: recall divides by actual positives (TP + FN), while precision divides by predicted positives (TP + FP).
  • Threshold choice matters: reducing the threshold often raises recall but can create additional false positives; the precise trade-off depends on the model and data.
  • Define the positive class: when labels differ from 0/1, specify pos_label. For multiclass evaluation, choose an appropriate classwise or averaging scheme.
  • No actual positives: when TP + FN = 0, recall is undefined mathematically. In scikit-learn, zero_division controls its handling.

In short: recall measures how successfully a classifier finds actual positives. If missed cases are especially dangerous or expensive, recall is a key metric—but should not be considered in isolation.

References

#recall in machine learning#recall formula TP FN#sensitivity true positive rate example#sklearn recall_score python#machine-learning#classification-evaluation#recall#sensitivity#true-positive-rate

Learning Sequence

Machine Learning Curriculum

73% Completed
Up NextMachine Learning

What is specificity?

Explore Related Questions

Deepen your understanding across related Machine Learning topics.

Machinoai Logo
Machinoai

Your edge in the AI era. Deep dives into machine learning concepts, paper explainers, verified industry jobs, and developer tools.

© 2026 Machinoai. All rights reserved.