A fictional community kitchen needs tomorrow's meal plan. Use the lesson experiments to gather evidence, then write a short project note that another person can question and use.
This worksheet joins the existing course. Work through it as you finish each lesson; the optional notebook puts the same workflow into Python.
Choose a sensible decision rule before looking at scores.
For this exercise, prefer a model only if it reduces validation MAE by at least 2 meals against the baseline. Ask separately whether its underestimates are acceptable: MAE alone gives shortages and surplus equal weight. This threshold is a teaching choice, not evidence about a real kitchen. Passing it does not establish a reliable improvement; that needs more time-aware assessment and a decision with the people using the service.
Frame the question and identify information available before the decision.
Inspect the data, protect later days, and fit preparation on training rows.
Record what remains uncertain. A synthetic-data exercise is practice, not a model ready to deploy.
Experiments use small lesson-specific synthetic datasets. The notebook independently generates 180 fictional days; its scores will differ. Label the source of each result you record.
YOUR PROJECT NOTE
Six decisions worth writing down.
Your answers stay in this open page. They are not submitted or saved by this worksheet. Download your note before leaving or refreshing. Avoid entering personal information.
OPTIONAL PYTHON
Run the whole workflow.
An original notebook generates 180 fictional days, inspects only the training block, fits preprocessing inside pipelines, compares a median baseline, Ridge and a small random forest, then opens the final test once.
It exports the fitted pipeline and a model note. You need Python, Jupyter and the listed packages; the notebook runs on your computer, not on this page.
Tested on 26 October 2026 with Python 3.13, NumPy 2.5, pandas 3.0 and scikit-learn 1.9: it runs from start to finish. Outputs are left empty so you see the results yourself.
What happens when you run it. Ridge regression is chosen on validation (6.5 meals average error, against 12.2 for the median baseline). On the final test it does worse: 9.0 meals, and it underestimates 72% of days. That gap is the point: a model chosen on one period can drift on later days, which is why the notebook ends with a monitoring plan.
The end-to-end workflow is informed by Aurélien Géron's teaching. Attention to sampling and evaluation is informed by Peter Bruce, Andrew Bruce and Peter Gedeck.
The explanations, worksheet, notebook code and generated data here were written independently for Code With Impact. No code, notebook cells, figures or datasets were copied from their repositories.
There’s no such thing as a silly question. Ask us about anything in these lessons, suggest an improvement, or collaborate with us on a lesson or a real project for a charity or research team.