F1 score
/ EFF-wun skor /
The F1 score rolls precision and recall into a single number, so you can compare models without juggling two figures at once. Because precision (how clean your alarms are) and recall (how few you miss) usually trade off, F1 rewards a model only when both are decent. Score high on F1 and you are both careful and thorough — not just one of the two.
Technically, F1 is the harmonic mean of precision and recall, not the ordinary average. The harmonic mean is deliberately harsh on imbalance: if precision is 100 percent but recall is 1 percent, the plain average would be a flattering 50 percent, but F1 lands near 2 percent. It refuses to let one strong number paper over one terrible one, which is exactly the point. F1 runs from 0 to 1, higher being better.
F1 is a sensible default when the positive class is rare and you care about catching it, like fraud or disease. But it is not sacred. It weights precision and recall equally, which may not match your real costs — if missing a tumor is far worse than a false alarm, you might prefer the F-beta variant that leans toward recall. And like all single numbers, F1 quietly throws away detail; the confusion matrix behind it still tells the fuller story.
Model A: precision 0.90, recall 0.30 → F1 = 0.45. Model B: precision 0.60, recall 0.60 → F1 = 0.60. Their plain averages are identical (0.60), yet F1 prefers the balanced Model B — exactly because A's lopsided recall drags it down.
Same arithmetic average, different F1: the harmonic mean punishes imbalance.
F1 ignores true negatives entirely — the cases everyone agreed were not the rare thing. That is fine when negatives are abundant and uninteresting, but it means F1 says nothing about how well you avoid false positives among the easy majority. Pick the metric that matches what failure actually costs you.