Chapter 2 · Machine learning basics
The confusion matrix
A 2×2 grid of hits, misses, false alarms and correct rejections shows exactly how a classifier errs.
Chapter 2 · Machine learning basics
A 2×2 grid of hits, misses, false alarms and correct rejections shows exactly how a classifier errs.
Each email gets two facts: what the model said, and what is true.
Every prediction has the model's answer and the real answer. Together they choose one of four boxes.
Here a “positive” means spam. It is just the thing we are trying to find.
Read each email, call it spam or not, and see which box it falls into. Then let the keyword bot judge the rest. Tap any box to list its emails.
Email 1 of 12
The keyword bot flags any email with words like free, prize or urgent. Notice its false alarm on a harmless “free webinar” and the sneaky spam it misses. A simplified teaching version with twelve made-up emails.
A fine email lands in your spam folder. Which box is that?
Real spam reaches your inbox. Which box is that?
Which boxes make up the model's correct answers?