🎯

Confusion Matrix

From: Measuring Success•View in lesson →

💡

Not all mistakes are equal. A spam filter that misses spam (false negative) is different from one that blocks important emails (false positive). The confusion matrix helps you understand exactly how and where your model makes mistakes.

Confusion Matrix

Predicted: 0
Predicted: 1
Actual: 0
True Negative
26
Correctly rejected
False Positive
24
False alarm
Actual: 1
False Negative
0
Missed it!
True Positive
50
Correctly caught
Conservative (fewer positives)Aggressive (more positives)
Accuracy
76.0%
(TP+TN)/All
Precision
67.6%
TP/(TP+FP)
Recall
100.0%
TP/(TP+FN)
F1 Score
80.6%
Balance

What Optimizing for ACCURACY Means:

You care about overall correctness. Works well for balanced data. Fails catastrophically on imbalanced data (like fraud detection).

Experiment as much as you like; there is no progress to lose.