Log inStart free
LESSON 4.48 · 6 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW

The confusion matrix

Watch one threshold sort 100 predictions into the four cells that every metric reads.


Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 2 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 4.48 · EVALUATION BAY100 SAMPLES · 50 CLASS 1 · 50 CLASS 0
01
Stage 1 of 6 · Scores
A model gives 100 test samples a score from 0 to 1. 50 of them are class 1.
Explain it simply

Each mark is one test sample, like one email that is spam or not. Dots above the line are class 1, and squares below are class 0. Here 50 are dots and 50 are squares. Each mark sits at its score, so most dots sit further right than most squares.

A score axis from 0 to 1. 50 dots of class 1 stack above it and 50 squares of class 0 stack below it.

samples · rightwrongthresholdpredictions, metrics
0.00.10.20.30.40.50.60.70.80.91.0scoreclass 1class 0the scores0.00.10.20.30.40.50.60.70.80.91.0scoreclass 1class 0the scores
Toy: 100 test samples, one seeded classifier
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
si∈(0,1),yi∈{0,1}\sy{s}{data}{s_i} \in (0, 1), \quad \sy{y}{data}{y_i} \in \{0, 1\}
n=100,ny=1=50,ny=0=50n = 100, \quad n_{y=1} = 50, \quad n_{y=0} = 50

Each sample has a score and a true class.

Common mix-ups

MYTHA model with 95% accuracy is a good model.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01If the threshold goes from 0.5 to 0.7, does recall go up or down?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
  • 5 more stages and 2 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.