Confusion Matrix
A table that breaks down the model's predictions into four bins: how many times the model got it right and how many times it got it wrong. From this, the main quality metrics are calculated.
Four Fields
| Predicted 'yes' | Predicted 'no' | |
|---|---|---|
| Actually 'yes' | TP | FN |
| Actually 'no' | FP | TN |
- TP — correctly predicted 'yes';
- TN — correctly predicted 'no';
- FP — false alarm;
- FN — missed.
What is Calculated From It
- Precision = TP / (TP + FP);
- Recall = TP / (TP + FN);
- F1 Score — harmonic mean of the two previous metrics.
Why It Is Needed
One accuracy figure hides where exactly the model is making mistakes. The matrix shows whether the model is confusing 'yes' with 'no', or missing the important ones more often.