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

Precision–recall curves

Slide one threshold and watch precision and recall trade places on a 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.50 · PR BAY20 POSITIVES · 80 NEGATIVES · 20% POSITIVE
01
Stage 1 of 6 · Scores by class
A classifier scores each example from 0 to 1. Dots are the 20 positives (class 1); squares, the 80 negatives (class 0).
Explain it simply

Each mark is one example, placed at the score a classifier gave it. Dots on top are positives, the things you want to find. Squares below are negatives. Dots sit further right, but the two groups overlap in the middle.

A score line from 0 to 1. 20 dots sit above it and 80 squares below it. Most dots sit to the right of most squares.

examples · right callsthresholdcurve, areaerrorsrandom
0.000.250.500.751.00score● class 1■ class 0000.50.511recallprecisionscores by class20 positives · 80 negatives0.000.250.500.751.00score● class 1■ class 0000.50.511recallprecisionscores by class20 positives · 80 negatives
Toy: the 4.C7 classifier · 100 samples, 80/20
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\}
n1=20, n0=80n_1 = 20,\ n_0 = 80

Each example has a score and a true class.

Common mix-ups

MYTHRaising the threshold always raises precision.

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

Predict, then reveal
3 CHECKS · PRO
Q01Raise the threshold from 0.50 to 0.70. 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 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.