Knowledge Maxxing
← Back to topic library
ML MaxxingBeginner75 sec

Confusion matrix

A confusion matrix is a table showing how many predictions of each class matched or did not match the true class, breaking results into correct and incorrect predictions of each type.

Prerequisite: Accuracy

What matters

Because it separates false positives from false negatives, a confusion matrix reveals what kind of mistakes a model is making, which a single accuracy number cannot show.

Example

A confusion matrix for a spam filter shows separately how many real spam emails were missed and how many real emails were wrongly flagged as spam.

Common misconception

A confusion matrix is not itself a single score; it is the underlying table that metrics like precision, recall and F1 are calculated from.

Recall question

What can a confusion matrix show that a single accuracy number cannot?

Keywords and related concepts

confusion matrixfalse positivefalse negativeprecision

Related topics

Precision
ML MaxxingBeginner
Recall
ML MaxxingBeginner
Accuracy
ML MaxxingBeginner