Confusion Matrix

A confusion matrix counts correct and incorrect classification outcomes by predicted and actual class.

Intuition

It shows what kinds of mistakes the model makes, not just how often it is wrong.

Technical definition

For binary classification, a confusion matrix records true positives, false positives, true negatives, and false negatives.

Example

A medical classifier confusion matrix shows how many sick patients were detected or missed.

Common misunderstandings

  • A confusion matrix is more informative than accuracy alone.
  • It must be interpreted relative to class imbalance and risk.

Need this inside a product?

The studio builds the systems these terms describe. Tell us what you are working on.