Evaluation

F1 Score

1 min read

In Short

The harmonic mean of precision and recall, providing a single metric that balances both concerns.

F1 score is useful when you need both precision and recall but want a single number for comparison.

Formula

F1 = 2 × (Precision × Recall) / (Precision + Recall)

Limitations

  • Assumes equal importance of precision and recall
  • Can hide important tradeoffs
  • Consider F-beta for weighted balance
evaluationmetricsclassification