CourseAI / ML Engineer: The Complete Course · Module 3: Classical Machine Learning · part 20 of 93
Part 20 · Module 3: Classical Machine Learning

Lesson 2: Neighbours, groups, maps, forecasts and oddities

29 min read·
Module 3 · Lesson 2 · About 50 minutes · Needs: lesson 1 (the split and PR-AUC), pandas, and the Kestrel data (course-guide/06). Module 1 lesson 1 covers PCA's maths.

The situation

Lesson 1 answered one question: will this parcel be late? Others at Kestrel ask different ones. Morag: "Which routes behave alike, so planners can share fixes?" and "How many late parcels tomorrow, so I know how many spare vans to hold?" Tomasz: "Can something tell me when a depot-day looks wrong before anyone complains?"

Each gets a different tool on the same simulated data. KP0104204 (Dartford, 2 September, 18:00, late) and its route DAR-R28 stay the running example.

WHERE THIS FITS The Kestrel system this lesson SHARED SERVICES Depot scans parcels, routes Ingestion nightly batch Validation Pandera checks Data lake Parquet, DuckDB Experiments MLflow runs Training LightGBM, Optuna Online store Feast, Redis Features point in time Gates vs the champion Registry staged versions Serving API FastAPI, ONNX Consumers vans, customers Retraining trigger, budget Alerting on call Monitoring drift, Evidently Late labels a day later Orchestrator Prefect flows Versions DVC, Git CI/CD GitHub Actions Containers Docker images
This lesson works beside training (blue): grouping, maps and forecasts help planners, and its anomaly checks become part of monitoring in Module 11.

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.

Or open everything with a plan