MCDMModel EvaluationClassification MetricMath steps

Weighted F1

Also known as: Support-weighted F1

OriginatorMulti-class evaluation communityYear2000sSources2Related methods7

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.

Key highlights

  • 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.

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 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

Strengths
  • 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.
Limitations
  • 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.

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

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

  1. 1.
    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.
  2. 2.
    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.

You have read it. What now?

Cite this page

ScholarGate. (2026, June 3). Weighted F1. ScholarGate. https://scholargate.app/model-evaluation/weighted-f1