A confusion matrix organizes binary classification results into four outcomes: true positives, false positives, true negatives, and false negatives. It exposes mistakes that overall accuracy can hide when classes are imbalanced. section 14.0 section 14.3
The four outcomes come from comparing two decisions: the human-provided label and the model’s predicted value against a classification threshold. Crossing those two boundaries divides samples into four quadrants. section 14.3
Read the quadrants as follows:
- True positive: the model predicts the event of interest and the label agrees. section 14.3
- False positive: the model predicts the event of interest, but the label does not. section 14.3
- True negative: the model rejects the event of interest and the label agrees. section 14.3
- False negative: the model rejects the event of interest even though the label identifies it. section 14.3
A guard-dog analogy
Imagine a dog deciding whether to bark at a burglar. The human label identifies whether each visitor is actually a burglar; the dog’s bark-worthiness score is compared with a barking threshold. Correct and incorrect barking decisions populate the four quadrants. section 14.3
Figure 14.4 Cats, birds, rodents, and robbers make up our four classification quadrants. They are separated by a human label and the dog classification threshold.
Use the quadrant diagram to see how human labels and model thresholds separate true and false positives and negatives. section 14.3













