Confusion Matrix Metric
What is a Confusion Matrix?
A Confusion Matrix is a table that summarizes the performance of a classification model by showing the counts of correct and incorrect predictions for each class.
Structure (Binary Classification)
| Predicted Positive | Predicted Negative | |
|---|---|---|
| Actual Positive | True Positive (TP) | False Negative (FN) |
| Actual Negative | False Positive (FP) | True Negative (TN) |
Derived Metrics
- Accuracy = (TP + TN) / Total
- Precision = TP / (TP + FP)
- Recall = TP / (TP + FN)
- Specificity = TN / (TN + FP)
How to Read
- Diagonal: Correct predictions
- Off-diagonal: Errors
- Row sums: Actual class totals
- Column sums: Predicted class totals
Related Terms
- Accuracy: Proportion correct
- Precision: Positive predictive value
- Recall: Sensitivity