Skip to content

F1 score

The harmonic mean of precision and recall for the same positive class.

Machine learning

What does the F1 score combine?

The F1 score combines precision and recall for the same positive class as their harmonic mean. One formula is 2 × TP / (2 × TP + FP + FN). TP means true positives, FP false positives and FN missed positive cases. True negatives do not enter this formula. If TP, FP and FN are each zero, the ratio is undefined; reporting must make the presentation of this special case clear.

In the fictional example with 50 service requests, there are 18 true positives, 6 false positives and 2 missed technical requests. Precision is 75 % and recall 90 %. This gives 36 / 44, or 81.8 % rounded. The F1 score summarises both metrics but does not weight the operational consequences of wrongly routed and missed requests. Separate error counts and the resulting handling needs therefore remain visible when making a decision.

Sources