All courses › Machine Learning and Data Analysis › The confusion matrix
The confusion matrix
A classification model can be wrong in two ways: it can raise a false alarm, or miss something that is there. The confusion matrix counts the four outcomes, and all the usual measures are calculated from these four numbers.
accuracy
Symbols
| true positive: found what was there | ||
| false positive: false alarm | ||
| false negative: missed | ||
| true negative |
Example
TP = 40, FP = 10, FN = 20, TN = 930:
accuracy , even though the model misses a third of the positives.
When the classes are imbalanced, accuracy says little. Look at precision and recall instead.
Practise classification and evaluation for free →
← Learning rate · Precision and recall →
Part of Machine Learning and Data Analysis: Classification and evaluation.