Add data

Chart type

All 206 charts

Confusion matrix maker

See which classes a model gets right and which it mixes up.

Needs a text or number column for Actual class and a text or number column for Predicted class, plus a number column for Count if you have it.

Need a dashboard or a data story?

We design and build them with charts drawn for your brand, not a library's defaults.

  • Product dashboards Analytics and admin views your customers open every day.
  • Reports and data stories Investor updates, annual reports and research that read in one pass.
  • Data-heavy websites Interactive charts, maps and calculators built into your site.

How to make a confusion matrix

  1. Paste your data

    Paste cells from a spreadsheet or upload a CSV with a text or number column for Actual class and a text or number column for Predicted class, plus a number column for Count if you have it.

  2. Check the columns

    The confusion matrix picks its columns for you. Change any of them under Data.

  3. Style it and download

    Under Style, pick a look, colours, background and size, add a title and source, then download SVG or PNG.

What is a confusion matrix?

A confusion matrix is a grid that counts a classifier's predictions against the true classes, with one row per actual class and one column per predicted class. Correct predictions fall on the diagonal.

How to read it

Colour shows each cell's share of its row, so a dark diagonal means each class is mostly predicted correctly. Bright cells off the diagonal are the mix-ups: read across a row to see where that class's cases went. The row share on the diagonal is recall for that class, and overall accuracy is the diagonal total divided by all cases.

When to use it

See which classes a model gets right and which it mixes up. It is one of the correlation charts, which show how two or more measures move together.

To compare how a model performs across every threshold rather than one, use a ROC curve. If you only need accuracy per class side by side across models, a Grouped column chart is simpler.

Tips for a better confusion matrix

  • Supply one row per actual and predicted pair with a count, or one row per case and let the chart do the counting.
  • Check the row totals as well as the shares, because a class with very few cases can show a striking percentage from a handful of errors.
  • Do not judge an imbalanced problem on accuracy alone: a model that always predicts the majority class can still score high.

Data you need

One row per item with a text or number column for Actual class and a text or number column for Predicted class, plus a number column for Count if you have it. Column names can be anything; the chart maker matches columns by type, and you can change the match under Data.

ActualPredictedCount
BillingBilling182
BillingBug report9
BillingAccount21
BillingFeature request4
Bug reportBilling6
Bug reportBug report241
Bug reportAccount11
Bug reportFeature request27
Download the sample CSV

Questions, answered

What is a confusion matrix?
A confusion matrix is a grid that counts a classifier's predictions against the true classes, with one row per actual class and one column per predicted class. Correct predictions fall on the diagonal.
How do you read a confusion matrix?
Colour shows each cell's share of its row, so a dark diagonal means each class is mostly predicted correctly. Bright cells off the diagonal are the mix-ups: read across a row to see where that class's cases went. The row share on the diagonal is recall for that class, and overall accuracy is the diagonal total divided by all cases.
How do I make a confusion matrix?
Paste your data into the chart maker with a text or number column for Actual class and a text or number column for Predicted class, plus a number column for Count if you have it. The confusion matrix draws as you type. Then pick a look and a size and download it as SVG or PNG.
When should I use a confusion matrix?
See which classes a model gets right and which it mixes up. It belongs to the correlation family of charts, which show how two or more measures move together. To compare how a model performs across every threshold rather than one, use a ROC curve. If you only need accuracy per class side by side across models, a Grouped column chart is simpler.
Is this confusion matrix maker free?
Yes. It is free with no sign-up, your data stays in your browser, and you can download the confusion matrix as SVG or PNG.