Log inStart free
LESSON 4.49 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

Thresholds and the ROC curve

Watch one threshold slide across the scores and trace the ROC curve.


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

Go Pro · $8.25/mo
EXPLAINER · 4.49 · THRESHOLD BAY100 SAMPLES · SCORES 0.01–0.97
01
Stage 1 of 6 · Scores
The classifier scores 100 samples: dots are class 1, squares class 0. Most dots score above most squares.
Explain it simply

Each shape is one test sample, placed by its score. The dots above the line are the samples whose true class is 1. The squares below it are class 0. This classifier is good but not perfect: some squares sit among the dots.

A score line from 0 to 1. Fifty dots stack above the line and fifty squares below it. Scores run from 0.01 to 0.97.

samples: dot class 1, square class 0threshold tcalled class 1, ROC curve and AUCwrong calls and error costa guessing classifier
00.51score sclass 1class 0the scoreseach example: one score s from 0 to 100.51score sclass 1class 0the scoreseach example: one score s from 0 to 1
Toy: the 4.C7 classifier · 100 samples, 50/50 · seeded scores
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
si=f(xi)∈(0,1),yi∈{0,1}\sy{s}{data}{s_i} = f(x_i) \in (0, 1), \quad \sy{y}{data}{y_i} \in \{0, 1\}
top: p17, s=0.97,lowest: n18, s=0.01\text{top: p17, } s = 0.97,\quad \text{lowest: n18, } s = 0.01

Each sample has a score and a true class.

Common mix-ups

MYTHA new threshold changes the ROC curve and its AUC.

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

Predict, then reveal
3 CHECKS · PRO
Q01If the classifier only guesses, where does the ROC curve run?

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 3 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.