NEW
Also known as: F-score
The harmonic mean of precision and recall, providing a single measure of classification performance with equal weighting.
DESCRIPTION
F1-score balances precision and recall, offering a useful summary metric for imbalanced classification. Macro F1 averages across classes equally; micro F1 aggregates over instances. Optimal thresholds maximize F1 given business constraints. F1 is insensitive to true negatives, so consider additional metrics when they matter. Use PR curves to visualize trade-offs. Calibration and class weights influence F1 outcomes. Report confidence intervals for reliability. F1 aids model comparison and deployment decisions.
ALTERNATIVE DEFINITIONS
scikit-learn
The F1 score can be interpreted as a weighted average of the precision and recall, where an F1 score reaches its best value at 1 and worst at 0.
Defines interpretive bounds and relation to precision–recall.
Wikipedia
The F1 score is the harmonic mean of precision and recall.
Concise mathematical definition aligning F1 with harmonic mean.
Google Developers
F1 score is the harmonic mean of precision and recall.
Short glossary emphasizing the harmonic mean definition.
RELATED TERMS
Precision Recall Confusion Matrix Precision-Recall Curve Class Imbalance Thresholding Macro/Micro Averaging
COMPETING TERMS
RELATIONS
- Broader: Score
KNOWLEDGE AREAS
Data Science AI Mathematics Testing & Validation
TARGET AUDIENCE
Data Scientist AI Engineer MLOps Engineer Data Analyst
EXTERNAL SOURCES
- Wikipedia - F-score
- scikit-learn - User guide entry for F1
- TensorFlow Addons - API for F1 metric implementation
- Microsoft Learn - Classification metrics including F1
TOP QUESTIONS
What is the F1-Score?
It is the harmonic mean of precision and recall, balancing false positives and false negatives with equal weighting.
Category: Definition
When should I use F1-Score?
Use it when class imbalance exists and both precision and recall matter for the task.
Category: Opinion
How do macro and micro F1 differ?
Macro averages class scores equally; micro aggregates over all instances, favoring majority classes.
Category: Comparison
How do thresholds affect F1-Score?
Changing thresholds shifts precision and recall; find the threshold that optimizes F1 for your use case.
Category: Requirements
What’s a common mistake with F1-Score?
Optimizing F1 without checking class-wise metrics can hide poor minority class performance.
Category: Mistakes
Is F1-Score suitable for multi-label classification?
Yes. Use appropriate averaging (macro, micro, weighted) and per-label evaluation.
Category: Topic
What risks exist relying only on F1-Score?
F1 ignores true negatives; complement with other metrics or cost-sensitive evaluation when they matter.
Category: Risk
How to improve F1-Score?
Adjust thresholds, rebalance classes, add informative features, and calibrate probabilities.
Category: Best practices
What is a practical analogy for F1-Score?
It’s like balancing catching real fraud while minimizing false accusations.
Category: Example