Precision, Recall, and F1 Score
Explore precision, recall, and F1 score to evaluate classification models. Understand how each metric measures true and false predictions, and learn when to prioritize precision or recall based on error costs. This lesson helps you interpret these metrics to choose appropriate thresholds and improve model decision-making.
A screening test for a serious condition can succeed in two incompatible ways. It can catch nearly every patient who has the condition, or it can avoid sending healthy patients to unnecessary follow-up testing. Missing a true case is a false negative (FN). Flagging a healthy patient is a false positive (FP). Both errors matter, but they answer different questions.
Suppose a clinic screens 1,000 patients. A test that catches 95 of 100 true cases has only 5 false negatives. That result matters when delayed treatment carries serious harm. Yet if the same test flags 400 healthy patients, clinicians must order many avoidable tests. A confusion matrix gives us the counts of true positives (TP), false positives (FP), true negatives (TN), and false negatives (FN). We now need ratios that express the two competing priorities.
Two questions from the same counts
Precision asks how trustworthy a positive prediction is. Among patients the test marked as having the condition, precision is the share who truly have it.
The denominator