Confusion matrixRight and wrong predictions in a grid.

What really happened down the side, what the model said across the top. Right answers on the diagonal, the two kinds of mistakes in the other corners.

  • Answers Is the model any good?
  • Your data counts of actual against predicted classes
  • Classes 2, sometimes up to about 10
  • Gives accuracy, precision, recall
  • Excel and Power BI a matrix or PivotTable
PredictedActualSaid leaveSaid stayLeft160True positive40False negativeStayed54False positive746True negativeAccuracy 91% Precision 75% Recall 80%
A churn model on 1,000 customers

What is a confusion matrix?

In one sentence

Why use a confusion matrix?

How does a confusion matrix work?

What are the parts of a confusion matrix?

How do you read a confusion matrix?

What kinds of confusion matrix are there?

When should you use a confusion matrix?

Confusion matrix or accuracy alone?

How do you make a confusion matrix?

What goes wrong with confusion matrices?

Model checks

Every chart for “Is the model any good?”

  1. ClassifiersROC curveHow well a model separates two classes, at every cut-off.
  2. ClassifiersLift chartHow much better a model finds the cases than picking at random.
  3. RegressionResidual plotWhat a model got wrong, point by point, around zero.

Every chart, by its question

From the blog

Read on, step by step.

Every post

Your own numbers

Does it fit your data? Try it.

Paste your table into Chart Compass, say what the chart should show, and see the charts that fit, drawn with your own numbers. It runs in your browser, so the data stays with you.