Precision and Recall
Precision measures how trustworthy positive predictions are; recall measures how many actual positives the model captures.
Definition
Precision = : "of the things you predicted as positive, how many are actually positive?"
Recall = : "of all the actual positives, how many did you catch?"
Intuition
Precision and recall trade off — a model that predicts only the most certain positives has high precision but low recall.
Spam filtering: high precision means few real emails are flagged (low false positives); high recall means most spam is caught.
Worked example
A model that flags every transaction as fraud: recall = 1.0 (catches all fraud) but precision is near 0 (many false alarms).
A model that only predicts fraud for the most obvious case: precision near 1.0 but low recall.
The math
Specificity = , the true negative rate — useful in medical testing alongside recall (sensitivity).
The precision-recall curve plots precision vs. recall at different thresholds; AUC-PR summarizes performance across thresholds.
In practice
Use precision when false positives are costly (reputational damage, unnecessary interventions).
Use recall when false negatives are costly (missed cancer, undetected fraud).
Go deeper
More in Data science
Assembled from the ReLU.chat curated knowledge base. These explanations are concise on purpose; check the sources for anything important.