The F1 score is a single number that combines precision and recall into one metric by taking their harmonic mean, so both must be reasonably high for the score to be good.
The F1 score is two times precision times recall divided by precision plus recall. It is the harmonic mean, which penalizes imbalance between the two metrics more than the arithmetic mean would.
That harmonic mean property is why F1 is preferred over simple averaging on imbalanced problems. If precision is 1.0 and recall is 0.1, the arithmetic mean is 0.55, but the F1 score is roughly 0.18, which honestly reflects poor practical performance. The downside is that F1 treats precision and recall equally, even when one is more important than the other.
Think of it like this. Think of two exam scores. If one is 90 and the other is 10, the simple average of 50 hides the failure. The F1 score of roughly 18 tells you the true balance between the two.
The harmonic mean formula is 2 * (precision * recall) / (precision + recall). When precision and recall are equal, F1 equals that shared value. When one is much lower than the other, F1 drops sharply. Variants such as F2 and F0.5 weight recall or precision higher when the application demands it.
"F1 is the only metric I need." It hides confusion-matrix structure and ignores true negatives. "High F1 means the model works." It can be high even when the threshold is arbitrarily chosen. "F1 applies to every problem." Multi-class settings need micro, macro, or weighted variants.
Compact and intuitive, but single-number summaries can hide important error patterns. Best used alongside precision-recall curves and confusion matrices for full diagnosis.