Beginner · Evaluation
F1 Score
Visual diagram · (in preparation) · Math · (in preparation) · Worked example · 3 difficulty levels.
TL;DR. The harmonic mean of precision and recall, balancing both into a single number.
Technical Definition
The harmonic mean of precision and recall, balancing both into a single number.
How it works
F1 = 2·P·R / (P+R). It punishes models that score high on only one of precision or recall, making it a popular choice for imbalanced classification. Variants include macro-F1 (average per class) and weighted-F1.