Weighted F1
Weighted F1-Score · Also known as: Support-weighted F1
Weighted F1 computes the F1-score for each class and then takes a weighted average, where weights are proportional to the number of samples in each class (support). It provides a middle ground between macro and micro-averaging.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Use weighted F1 when class frequencies are natural and representative of their importance, but you want to account for per-class variation rather than simply collapsing to accuracy. It is useful for datasets with moderate imbalance where all classes matter but more common classes reasonably should have more influence.
Strengths & limitations
- Provides a balanced view between per-class and aggregate metrics.
- Respects natural class frequencies while still considering per-class performance.
- More robust than macro F1 to rare classes with unstable metrics.
- Useful as a middle ground when the choice between macro and micro is unclear.
- Does not equally value all classes; rare classes have less influence.
- May still hide poor performance on minority classes if they are sufficiently rare.
- More complex to interpret than pure macro or micro averaging.
- Not appropriate when all classes need equal importance regardless of frequency.
Frequently asked
How does weighted F1 differ from macro and micro F1?
Macro F1 equally weights all classes. Micro F1 weights by frequency (equivalent to accuracy). Weighted F1 weights by support, providing a middle ground. In balanced datasets, all three are similar. In imbalanced datasets, macro F1 is lowest (emphasizes minority), micro F1 is highest (emphasizes majority), and weighted F1 falls between them.
When should I use weighted F1 instead of accuracy?
Use weighted F1 when you want to ensure balanced precision and recall across classes while respecting their frequencies. Accuracy only measures correctness; weighted F1 considers the balance of false positives and false negatives. Weighted F1 is more nuanced for imbalanced datasets.
Is weighted F1 always better than macro F1?
Not necessarily. Weighted F1 is better when class frequencies reflect their importance and hiding minority class problems is acceptable. Macro F1 is better when all classes must be equally important regardless of frequency. Choose based on your problem's requirements, not because one is universally 'better.'
Sources
- 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. link ↗
- Sokolova, M., Japkowicz, N., & Szpakowicz, S. (2006). Beyond Accuracy, F-Score and ROC: a Family of Discriminant Measures for Performance Evaluation. AI 2006, 4013, 1015-1021. DOI: 10.1007/11941439_114 ↗
How to cite this page
ScholarGate. (2026, June 3). Weighted F1-Score. ScholarGate. https://scholargate.app/en/model-evaluation/weighted-f1
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- F1-ScoreModel Evaluation↔ compare
- Macro-averaged F1Model Evaluation↔ compare
- Micro-averaged F1Model Evaluation↔ compare