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

Lab: Model v1, honest baselines and ADR-001

58 min read·
Module 3 · Lab · About 60 minutes · Needs: lessons 1 to 3 of this module, and the Module 2 lab (or nothing: Step 1 rebuilds Modules 1 and 2)

What you are building

Model v1 and its evidence One model, judged, recorded Active flow 1 Processing step number Lesson 3's files features.py 18 columns split.py, calibrate.py metrics.py, baselines.py leakage.py the guard Model v1 LightGBM kestrel/train_v1.py ModelV1, judge six contenders same weeks Evidence reports/model-v1.md generated tests/test_leakage.py 3 tests ADR-001 model family 1 2 3
Lesson 3's files (gold) feed kestrel/train_v1.py, which trains model v1 and judges it with five other contenders (blue); the lab keeps the evidence: a generated report, leak tests and ADR-001 (teal); circles give the order.

Adaeze wants one model she can sign off, with the evidence beside it. The lessons compared six families, found the attempts leak and tuned LightGBM; this lab turns that work into model v1, a tuned LightGBM calibrated with Platt scaling, judged on the validation weeks against every honest baseline the course has built.

The lab puts the lessons' twelve files into the repository unchanged and adds four: kestrel/train_v1.py (the model and its comparison), reports/model-v1.md (generated by code, never edited), tests/test_leakage.py (forbidden columns can never reach training) and docs/adr/ADR-001-model-family.md, the course's first decision record. No cell calls a hosted model.

Open a new Colab notebook, call it module-03-lab.ipynb, and run each cell in order.

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