Concept icon
Concept

F1 Score

In binary classification, the F1 score summarizes how well a model balances precision and recall. It is the harmonic mean of those two values, so it reaches its best value of 1.0 only when both precision and recall are perfect. If either precision or recall is 0, the F1 score is 0. The metric is often used in tasks such as search ranking, document labeling, query classification, named entity recognition, and word segmentation. A common critique is that it weights precision and recall equally. Another limitation is that it ignores true negatives, which can make it less suitable when class imbalance is severe.

F1=21(1precision+1recall)F_1 = 2\frac{1}{\left(\frac{1}{precision}+\frac{1}{recall}\right)}

Image 0

0

1

Concept icon
Updated 2026-08-12

Tags

Data Science

Machine Learning

Deep Learning

Supervised Learning

Dive into Deep Learning @ D2L

Machine Learning Yearning @ DeepLearning.AI