Beyond a single number
Accuracy collapses all of a classifier's behavior into one figure, hiding which errors it makes. A confusion matrix lays predictions against truth in a small table so you can see the full pattern of right and wrong answers.
Reading the table
For a two class problem the matrix has four cells:
- True positives, correctly predicted positives
- True negatives, correctly predicted negatives
- False positives, negatives wrongly flagged positive, a false alarm
- False negatives, positives that were missed
From these four counts you can derive almost every classification metric, including precision, recall, and accuracy. The same idea extends to many classes, where the diagonal holds correct predictions and off diagonal cells show which classes get confused for which.
Why it helps
Seeing the off diagonal tells you whether a model confuses similar classes, which guides where to add data or features.
Key idea
The confusion matrix tabulates predictions against truth, revealing the specific kinds of errors and serving as the source for most classification metrics.