LESSON 4.04 · 6 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW
Dataset shift
Watch a model that tests well fail when serving data moves away.
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/moEXPLAINER · 4.04 · SHIFT BAYTRAIN 94% · 32 ORDERS
01
Stage 1 of 6 · Train the model
Logistic regression learns a line from 32 training orders. Above the line, it predicts late.
Explain it simply
Each dot is a food order: its hour and its road distance. A filled dot came late, and a ring came on time. The dashed curve is the world's rule: later in the day, traffic makes shorter trips late. The blue line is the model's guess at that rule.
32 training orders between 8:00 and 13:30. The model line splits late from on time. 30 of 32 are right.
order (filled = late)the world's rulemodel line, accuracywrong, gap, flagserving code change
Toy: 32 training, 24 test, 24 serving orders · rule 6 − 0.03(h − 8)² km plus noise · logistic regression
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
The model turns the hour and the distance into a chance of late.
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.