Model Development & Offline Evaluation
ML Engineer path · lesson 72 of 80An F1 of 0.90 means nothing when the positive class is 90% of the data. Step the four phases, pick a baseline that gives a number meaning, calibrate a forecast, and watch two models swap places on overall accuracy while their per-slice scores never move.
Key insight
Phase 2 exists for a reason that is not about accuracy. A simple model that is easy to deploy lets you build the entire pipeline end to end while every component is still easy to debug — so when the complex model arrives, the only new thing in the system is the model.
Phases of model development
Order the phases a team should move through.
Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.
- 1Drop a step here
- 2Drop a step here
- 3Drop a step here
- 4Drop a step here
Test your knowledge
What does the book say a heuristic gets you, if ML would give a 100% boost?
The short version
A runner reporting a finishing time with no distance, no course and no field. The number is real, precisely measured, and tells you nothing until you know what it beat.
In more depth
Model Development & Offline Evaluation
Four phases
Baselines — "evaluation metrics, by themselves, mean little"
An engineer excited about F1 0.90 on a task where the positive class appears 90% of the time — a model randomly outputting positive 90% of the time scores about the same.
Five baselines: random (uniform gives F1 0.167 / acc 0.5; the label distribution gives F1 0.1 / acc 0.82 on a 90/10 task) · simple heuristic · zero rule (always the most common class — if that's right 70% of the time, beat it significantly) · human · existing solutions.
"A good system isn't necessarily useful, and a bad system isn't necessarily useless."
Evaluation methods
Slice-based evaluation
Table 6-3, 90% majority: Model A 98% / 80% = 96.2% overall; Model B 95% / 95% = 95%. Choosing A hides bias against an underrepresented group.
Simpson's paradox (Charig et al., BMJ 1986): A wins both groups (93% vs 87%, 73% vs 69%) and loses overall (78% vs 83%). Berkeley 1973: 44% of 8,442 men admitted vs 35% of 4,321 women, yet women's rates were higher in four of six departments.
Three ways to find slices: heuristics-based · error analysis · slice finders. Slicing also reveals non-ML problems — a model was poor on mobile because a button was half hidden on small screens.
Interview Questions
References & Further Reading
Love this visualization?
Sign up to track your progress, earn achievements, use the AI assistant, and access your personal learning dashboard.
100% free • No credit card required