Past exam question: 2081 Chaitra (Regular), Q2(b)(i)
Open in the Padhaiko appQuestion
Considering the test data size as 50,000, a typical classification model experimentation results are as shown on the confusion matrix.
| PREDICTED CLASS: Yes | PREDICTED CLASS: No | |
|---|---|---|
| ACTUAL CLASS: Yes | 1000 | 1000 |
| ACTUAL CLASS: No | 1000 | 47000 |
Calculate Accuracy, Precision and -score measure data as per table below.
Solution
Identification of Confusion Matrix Elements: Treating "Yes" as the positive class and "No" as the negative class:
- True Positives (): Actual Yes, Predicted Yes
- False Negatives (): Actual Yes, Predicted No
- False Positives (): Actual No, Predicted Yes
- True Negatives (): Actual No, Predicted No
Total test observations:
Calculation of Accuracy and Precision:
- Accuracy: The ratio of correct predictions to total observations:
- Precision: The ratio of correctly predicted positive observations to total predicted positive observations:
Calculation of Recall and F1-Score: To evaluate the -score, we first determine Recall (Sensitivity):
The -score is the harmonic mean of Precision and Recall:
Alternatively, directly from confusion matrix counts:
Answer: