Skip to content
uencoder

F1 Score

The F1 score is the harmonic mean of precision and recall, F1=2PR/(P+R), balancing the two; it suits imbalanced-class evaluation.

Purpose

To balance precision and recall in a single metric for evaluating imbalanced classification.

Mechanism

F1=2TP/(2TP+FP+FN). The harmonic mean is sensitive to small values, so a low P or R yields a low F1. The Fβ generalization: β>1 weights recall, β<1 weights precision. Multiclass uses micro/macro averaging.

Use cases

  • Classification evaluation
  • Imbalanced data
  • Metric computation

Related terms

References