Every classifier in this course has reported "accuracy" as if it settles the question of whether a model is any good. Two classifiers can score the exact same accuracy while doing completely different — and completely differently useful — things.
Ten cases, nine negative and one positive — a rare event, like a rare disease or a fraud attempt. Toggle between a classifier that always says "negative" and one that actually catches the rare case. Watch the readout: their true/false positive/negative counts are entirely different.
A confusion matrix counts four outcomes: true/false positive, true/false negative. From those four numbers:
- — true positives: cases correctly flagged positive.
- — false positives: negative cases wrongly flagged positive.
- — false negatives: positive cases wrongly flagged negative.
- precision — of everything flagged positive, the fraction that's actually positive.
- recall — of everything actually positive, the fraction the model caught.
- — the harmonic mean of precision and recall, only high when both are high.
- Precision and recall ask different questions
Precision asks "of everything I flagged positive, how much was actually positive?" Recall asks "of everything actually positive, how much did I catch?" A model can score high on one while scoring low on the other.
- F1 needs both to be high at once
The , short for the F1 score, is the harmonic mean of precision and recall — a single number that only looks good when both are reasonably high, unlike an average that a lopsided pair could still inflate.
Two classifiers, read side by side. One never predicts positive at all; the other catches the single true positive at the cost of one false alarm. Precision, recall, and F1 tell them apart completely — accuracy alone can't.
Nine negatives, one positive. Classifier A always predicts negative; classifier B predicts positive on the true case plus one extra:
- Both classifiers score exactly 90% accuracy
A gets true negatives and false negative: . B gets true positive, false positive, true negatives: too — identical, despite behaving nothing alike.
- Precision and recall tell a completely different story
- Classifier A: precision , recall — it never predicted positive, so both are undefined-in-spirit and exactly zero by convention
- Classifier B: precision , recall — it caught the one case that mattered, at the cost of one false alarm
- F1 makes the difference impossible to miss
A's F1 is exactly . B's F1 is — a large, clear gap that "90% accuracy" alone completely hid.
Find the classifier whose F1 score clears 0.5 — accuracy alone won't tell you which one.
Accuracy treats every correct prediction as equally valuable — which is exactly wrong whenever one class is rare and getting it right matters more than getting the common class right. This is precisely the kind of imbalance that shows up in fraud detection, rare-disease screening, and search-and-rescue triage, and it's exactly the pattern Part V's interpretability-accuracy-tradeoff chapter gestured at without naming: the score itself can be a choice, not a neutral fact about the model.