Machine Learning
Build a predictive system from the baseline and feature pipeline through serving and monitoring.
Build a predictive system from the baseline and feature pipeline through serving and monitoring.
Before you start. Mathematics for AI and Data Science and basic Statistical Learning.
Use Python 3.12 for the examples. Install the dependencies with python -m pip install numpy scipy scikit-learn. Run each week as a separate script. Try the worked example on paper first, then change one assumption in the lab and explain the result. All datasets are small or generated locally.
The 12 weeks
| Week | Lesson | What you’ll do |
|---|---|---|
| 1 | Frame the task and build a baseline | Define a prediction contract and a score a model has to beat. |
| 2 | Datasets, delayed labels, and grouped splits | Keep repeat users and not-yet-available labels out of training leakage. |
| 3 | Feature pipelines and unseen categories | Apply training-time transforms consistently when an inference row looks new. |
| 4 | Train linear regression from scratch | Check gradient descent against the least-squares solution. |
| 5 | Select and tune supervised models | Compare candidate families under the same selection budget. |
| 6 | Imbalance, ranking, and decision costs | Evaluate the top of a queue when reviewers have a fixed capacity. |
| 7 | Clustering with centroids and density | See why a centroid objective can split a curved cluster. |
| 8 | Dimensionality reduction and anomaly detection | Detect departures from a training subspace. |
| 9 | Time-dependent prediction and rolling backtests | Make a forecast using only information available at its decision time. |
| 10 | Debugging by slice | Find errors hidden in an aggregate and separate model errors from label errors. |
| 11 | Serving parity and drift monitoring | Preserve the training transform and detect a shift in new inputs. |
| 12 | Capstone · Ship a reproducible prediction system | Package inference, report held-out and shifted results, and rehearse rollback. |