Why does the F1 score use the harmonic mean of precision and recall instead of the arithmetic or geometric mean?

Quick Overview

Asks for the intuition behind the F1 score and why it combines precision and recall with a harmonic mean. Tests how different means behave when the two rates diverge, what F1 counts and ignores, and when another metric fits better.

Why does the F1 score use the harmonic mean of precision and recall instead of the arithmetic or geometric mean?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

Explain the intuition behind the F1 score. Why do we take the harmonic mean of precision and recall, and not the arithmetic or geometric mean? ```hint Try an extreme case Pick a model with perfect precision and almost no recall, compute all three means, and ask which one matches how useful that model is. ``` ### What a Strong Answer Covers - What F1 measures, with its formula in terms of precision and recall and in terms of counts - How the three means behave when precision and recall are far apart, shown with numbers - Why the harmonic mean is a natural way to combine two rates that share a numerator - Where F1 falls short: true negatives, the choice of positive class, and unequal error costs ### Follow-up Questions - How does F-beta change the weighting, and how would you pick beta? - What is the difference between macro, micro and weighted F1 in a multiclass problem? - When would you report PR-AUC instead of F1 at one threshold? - How do you pick the threshold that maximizes F1, and how stable is it?

Overview: Asks for the intuition behind the F1 score and why it combines precision and recall with a harmonic mean. Tests how different means behave when the two rates diverge, what F1 counts and ignores, and when another metric fits better.

PracHub logo
General
Nov 25, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

Explain the intuition behind the F1 score. Why do we take the harmonic mean of precision and recall, and not the arithmetic or geometric mean?

What a Strong Answer Covers Guidance

  • What F1 measures, with its formula in terms of precision and recall and in terms of counts
  • How the three means behave when precision and recall are far apart, shown with numbers
  • Why the harmonic mean is a natural way to combine two rates that share a numerator
  • Where F1 falls short: true negatives, the choice of positive class, and unequal error costs

Follow-up Questions Guidance

  • How does F-beta change the weighting, and how would you pick beta?
  • What is the difference between macro, micro and weighted F1 in a multiclass problem?
  • When would you report PR-AUC instead of F1 at one threshold?
  • How do you pick the threshold that maximizes F1, and how stable is it?