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

WeekLessonWhat you’ll do
1Frame the task and build a baselineDefine a prediction contract and a score a model has to beat.
2Datasets, delayed labels, and grouped splitsKeep repeat users and not-yet-available labels out of training leakage.
3Feature pipelines and unseen categoriesApply training-time transforms consistently when an inference row looks new.
4Train linear regression from scratchCheck gradient descent against the least-squares solution.
5Select and tune supervised modelsCompare candidate families under the same selection budget.
6Imbalance, ranking, and decision costsEvaluate the top of a queue when reviewers have a fixed capacity.
7Clustering with centroids and densitySee why a centroid objective can split a curved cluster.
8Dimensionality reduction and anomaly detectionDetect departures from a training subspace.
9Time-dependent prediction and rolling backtestsMake a forecast using only information available at its decision time.
10Debugging by sliceFind errors hidden in an aggregate and separate model errors from label errors.
11Serving parity and drift monitoringPreserve the training transform and detect a shift in new inputs.
12Capstone · Ship a reproducible prediction systemPackage inference, report held-out and shifted results, and rehearse rollback.

Further reading · Rules of Machine Learning