Evaluation, lesson 4
The confusion matrix
What accuracy hides, and precision, recall and F1 per class.
"Read the failures first": sort failures into piles before choosing a number. For a system that sorts things into classes, the first number people reach for is accuracy. This lesson is about what it hides.
Part 1. 95% by never saying yes
A model reads incoming support tickets and flags the urgent ones: outages, security problems, payments stuck. Out of 1,000 tickets, 50 are urgent. Someone ships a version with a bug: it never flags anything.
Your turn
What accuracy does the model that never flags anything get on those 1,000 tickets?
Accuracy mixes two very different kinds of right answer. Here, being right about ordinary tickets is easy and plentiful. Being right about urgent ones is the whole point, and accuracy barely notices them.
Part 2. Four boxes
Keep going with Pro
You've done the first part. Pro opens the rest of this lesson, and every other one.
- Four boxes
- Precision, recall and the trade between them
- One row per class
Evaluation overviewSpotted a mistake? Tell us.