Machine Learning Basics
A two-class classification model was evaluated on 200 test samples, and its confusion matrix shows 45 true positives (TP), 5 false positives (FP), 45 false negatives (FN) and 105 true negatives (TN). Which pair of precision and recall is correct?
- APrecision 0.50, recall 0.90
- BPrecision 0.75, recall 0.50
- CPrecision 0.90, recall 0.50
Show answer and explanation
Answer: C. Precision 0.90, recall 0.50
Precision is the fraction of items predicted positive that are actually positive: TP ÷ (TP + FP) = 45 ÷ 50 = 0.90. Recall is the fraction of actually positive items that were predicted positive: TP ÷ (TP + FN) = 45 ÷ 90 = 0.50. This model is almost always right when it says positive, but it misses half of the positives. Accuracy is (45 + 105) ÷ 200 = 0.75.
- A. Precision and recall are swapped.
- B. 0.75 is the accuracy (the fraction of all predictions that are correct), not the precision.
- C. Correct. Precision is 45 ÷ 50 = 0.90 and recall is 45 ÷ 90 = 0.50.