F1-Score
Also known as: F-measure, Harmonic Mean
The F1-score is the harmonic mean of precision and recall, providing a single metric that balances both concerns. It was introduced by van Rijsbergen in information retrieval and has become a standard metric for evaluating classification models where both precision and recall are important.
Key highlights
- Balances precision and recall in a single metric, discouraging extreme strategies.
- Handles imbalanced datasets better than accuracy alone.
- Harmonic mean emphasizes balance; very low precision or recall significantly penalizes F1-score.
- Widely used and understood in machine learning and academic literature.
Intuition
This section is available to Pro members. Upgrade to Pro
How it works
This section is available to Pro members. Upgrade to Pro
When to use it
Use F1-score when both false positives and false negatives are costly and you want a single metric that balances both concerns. It is appropriate for imbalanced datasets where accuracy is misleading and you want to avoid extreme bias toward either precision or recall. F1-score is popular in NLP, text classification, and medical diagnosis where both precision and recall matter.
Strengths & limitations
- Balances precision and recall in a single metric, discouraging extreme strategies.
- Handles imbalanced datasets better than accuracy alone.
- Harmonic mean emphasizes balance; very low precision or recall significantly penalizes F1-score.
- Widely used and understood in machine learning and academic literature.
- Does not account for true negatives; a model could have high F1-score but poor specificity.
- Assumes precision and recall are equally important, which may not hold in all domains.
- Can be sensitive to small changes in classification decisions near the decision boundary.
- May not be appropriate when false positives and false negatives have very different costs.
Common pitfalls
This section is available to Pro members. Upgrade to Pro
Applications
This section is available to Pro members. Upgrade to Pro
Frequently asked
Why use the harmonic mean instead of the arithmetic mean of precision and recall?
The harmonic mean is more sensitive to extreme values. If precision is 0.99 and recall is 0.01, the arithmetic mean is 0.50, but the harmonic mean (F1-score) is approximately 0.02, which better reflects the model's actual uselessness. The harmonic mean penalizes imbalance between precision and recall.
How does F1-score differ from balanced accuracy?
F1-score depends on precision and recall, which focus on positive predictions. Balanced accuracy is the average of recall (sensitivity to positive cases) and specificity (sensitivity to negative cases). F1-score ignores true negatives, while balanced accuracy weighs both types of correct predictions equally.
When should I use macro-averaged vs. micro-averaged F1 on multi-class problems?
Use macro-averaged F1 when you want to weight all classes equally, giving more weight to rare classes. Use micro-averaged F1 when you want to weight by class frequency (more common classes matter more). Macro-averaging is preferable when rare classes are important; micro-averaging is equivalent to accuracy for multi-class problems.
Sources
- 1.van Rijsbergen, C. J. (1979). Information Retrieval (2nd ed.). Butterworth-Heinemann.
- 2.Powers, D. M. (2011). Evaluation: From Precision, Recall and F-Measure to ROC, Informedness, Markedness and Correlation. Journal of Machine Learning Technologies, 2(1), 37-63.
You have read it. What now?
Cite this page
ScholarGate. (2026, June 3). F1-Score. ScholarGate. https://scholargate.app/model-evaluation/f1-score