Lesson 4: Features that mean the same in training and serving
25 min read·
Module 5 · Lesson 4 · About 55 minutes · Needs: lessons 1 to 3, Module 3 lesson 3 (leakage and the time-based split), and pandas joins.
The situation
Week 5, Friday. Morag's planners have a hunch: "Some routes are just late. Tell the model which ones." That is a feature, a route's recent late rate. Adaeze's condition is that the number the model trains on is the number it will see at 06:00, computed the same way from data that existed then. Rhys adds that the service will read it from a fast store, not from the lake.
The running example is parcel KP0104204 (simulated) from Module 3: collected at Dartford on Wednesday 2 September 2026 at 18:00, route DAR-R28, late. What did Kestrel know about DAR-R28 at that moment?