Lesson 3: Honest models: leaks, baselines, costs and calibration
29 min read·
Module 3 · Lesson 3 · About 55 minutes · Needs: pandas, what a classifier and a train/test split are, and the Kestrel data (course-guide/06). Lessons 1 and 2 teach the models; here they are trained in a few lines.
The situation
Week 3 at Kestrel. Adaeze forwards the spring prototype: "It scored brilliantly. Find out why before anyone trusts it." Morag wants a list, at 06:00, of the parcels worth a warning, and what that list saves in pounds.
One parcel runs through the lesson: KP0104204 (simulated), collected from Dartford on Wednesday 2 September 2026 at 18:00, next-day service on route DAR-R28, 143 stops, a poor address. It arrived a day late, after two attempts.