Browse AI Foundation

What Is a Confusion Matrix? Seeing Exactly How a Model Gets Things Wrong

A single accuracy number hides a lot — a confusion matrix breaks down exactly which categories a model confuses with which, revealing patterns accuracy alone can't.

Breaking accuracy down by category

A confusion matrix is a table that breaks down a classification model's predictions against the actual correct answers, category by category — showing not just how often the model was right overall, but specifically which categories it tends to mistake for which other ones.

Why overall accuracy alone can be misleading

A model can have high overall accuracy while still failing badly on one specific, important category — especially if that category is rare in the data. A confusion matrix exposes exactly that kind of pattern, which a single aggregate accuracy number would otherwise hide completely.

What it's used for in practice

Reading a confusion matrix helps identify systematic error patterns — a model that consistently confuses two specific categories, for instance — pointing toward what specifically needs fixing, whether that's more training data for a weak category or a genuine model limitation.

Frequently Asked Questions

What is a confusion matrix?

A table that breaks down a classification model's predictions against actual correct answers by category, showing specifically which categories the model tends to confuse with which others, not just overall accuracy.

Why isn't overall accuracy enough to evaluate a classifier?

A model can have high overall accuracy while badly failing on one specific, often rare, category. A confusion matrix reveals that kind of pattern, which an aggregate accuracy score alone would hide.

Keep Exploring