Module 2 · Classifiers and generalisation · Lesson 6
Overfitting, regularisation and cross-validation
Why a model that fits its training tickets can fail on new ones, the bias–variance picture and where double descent breaks it, and the tools that keep a model honest: regularisation, early stopping, cross-validation with folds that respect time and groups, and a boosted-tree baseline fitted on the same split.
Setup for the exercises:Install Claude CodePython with uvThe Hollowbrook ticket dataRun Hugging Face models on CPU
By the end of this lesson you can
- Produce and read learning curves against model capacity and against training epochs, and point to underfitting and overfitting on each
- Explain bias and variance with the polynomial example, and state what double descent adds to the classical picture
- Apply L2 (ridge) and L1 (lasso) penalties, tune their strength with k-fold cross-validation, and explain why folds must respect time and groups
- Train a gradient-boosted tree model as the tabular baseline and compare it with logistic regression on the same split and metric
- Explain why early stopping, weight decay and dropout are one idea, and why more epochs can make a fine-tune worse
