L0.8
Errors: When a Model Gets It Wrong
Goal
By the end of this lesson, you can identify prediction errors, count them, inspect which examples failed, and use an error to form a reasonable debugging question.
An error is more than a bad score
A prediction error happens when the model's prediction does not match the target label.
On a tiny dataset, we can see every error directly.
Suppose a threshold predictor says:
predict
Truewhen the input is at least3.
And we have these examples:
| Input | Label |
|---|---|
| 1 | False |
| 2 | False |
| 3 | True |
| 4 | False |
| 5 | True |
| 6 | True |
The rule predicts:
| Input | Prediction | Label | Error? |
|---|---|---|---|
| 1 | False | False | No |
| 2 | False | False | No |
| 3 | True | True | No |
| 4 | True | False | Yes |
| 5 | True | True | No |
| 6 | True | True | No |
There is one error: input 4.
We could summarize that as 1 mistake out of 6 examples. But the summary is not the whole story.
The identity of the wrong example matters.