Is it better to have an F1 score of 1 or of 0?
F1-score reaches its best value at 1 (perfect precision and recall).
F1-score reaches its best value at 1 (perfect precision and recall).
Card 1 of 276. Answer: F1-score reaches its best value at 1 (perfect precision and recall).
About · Quizzes · History of AI · To suggest new questions or report an error send me a dm.
An F1 score of 1 is better. F1 is the harmonic mean of precision and recall and runs from 0 to 1. A score of 1 means every predicted positive is correct and every actual positive is found; 0 means the model found no true positives at all.
From the confusion matrix, F1 = 2TP / (2TP + FP + FN). It is 1 only when FP = FN = 0, and 0 whenever TP = 0 and some error exists. With 40 true positives, 10 false positives and 10 false negatives, F1 = 80 / 100 = 0.8. A model that never predicts the positive class scores F1 = 0, even at 99% accuracy.
A good F1 depends on how rare positives are. Labeling everything positive gives recall 1 and precision equal to the prevalence p, so F1 = 2p / (1 + p): about 0.67 at 50% prevalence, only 0.02 at 1%. An F1 of exactly 1 on a test set more often signals data leakage than a perfect model.