A binary classifier produces: TP=80, FP=20, FN=40, TN=860. What are the precision and recall?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Precision asks 'of what we called positive, how many were really positive?' — 80/(80+20)=0.80. Recall asks 'of all the actual positives, how many did we catch?' — 80/(80+40)=0.67.
Full explanation below image
Full Explanation
Precision = TP / (TP + FP) = 80 / (80 + 20) = 80 / 100 = 0.80 (80%). Of 100 predictions labeled positive, 80 were truly positive. Recall = TP / (TP + FN) = 80 / (80 + 40) = 80 / 120 ≈ 0.667 (66.7%). Of 120 actual positive cases, we correctly identified 80. F1 Score = 2 (0.80 0.667) / (0.80 + 0.667) = 2 * 0.533 / 1.467 ≈ 0.727. Accuracy = (TP + TN) / Total = (80 + 860) / 1000 = 0.94 (94% — inflated by majority class). Precision/Recall tradeoff: increasing threshold → higher precision, lower recall. Decreasing threshold → lower precision, higher recall. Choice depends on business cost: in fraud detection, high recall (catch all fraud) may be preferred even at cost of precision (false alarms).