Advanced modules¶
Four optional, self-study modules that take the course beyond ISLP: causal inference with randomised experiments, explaining black-box models with Shapley values, distribution-free uncertainty with conformal prediction, and the exponential-family machinery that unifies GLMs and penalized splines.
4 modules 300 slides 25 + 8 exercises with solutions 4 companion notebooks optional self-study
Each module is built exactly like a course deck — the same colour-coded callout
boxes, every exercise followed immediately by its worked solution, a closing
summary block and an optional appendix — and each is paired with a companion
notebook whose printed numbers match the slides seed-for-seed
(np.random.default_rng(2024)). The modules sit outside the twelve-lecture
plan: nothing in the course or its exams depends on them.
The modules¶
Module |
What it covers |
Slides |
Deck |
Notebook |
Colab |
|
|---|---|---|---|---|---|---|
A1 |
Randomised Controlled Trials |
Potential outcomes, the selection-bias decomposition, why randomisation works, regression adjustment with HC2 errors, power and sample size, ITT vs per-protocol, the peeking problem |
71 |
|||
A2 |
Explainable AI with Shapley Values |
Cooperative games and the four axioms, the marginal value function, exact Shapley by enumeration, Monte-Carlo sampling, waterfalls and global importance, the correlated-feature and retrain pitfalls |
73 |
|||
A3 |
Conformal Prediction |
Exchangeability, split conformal and the finite-sample quantile, marginal vs conditional coverage, locally weighted scores and CQR, classification prediction sets, the OLS stress test |
74 |
|||
A4 |
GLMs and Splines |
The exponential family, Poisson regression on |
82 |
Tip
Everything is implemented from scratch — exact Shapley values, split
conformal, P-splines — so the notebooks need nothing beyond the course
environment. The slides name the production tools (shap, MAPIE, mgcv-style
GAM software) once the mechanics are understood.
What each module assumes¶
Each module bridges back to the course chapters it extends, and assumes them:
Module |
Builds on |
|---|---|
A1 |
Ch 0 (standard errors, tests) · Ch 3 (regression) · Ch 5 (simulation) · Ch 13 (multiple testing — the peeking problem) |
A2 |
Ch 0b (counting and the 2ᵖ cost) · Ch 8 (boosting, variable importance) · Ch 10 (black-box models) |
A3 |
Ch 3 (prediction intervals) · Ch 5 (train/validation splits) |
A4 |
Ch 3–4 (linear and logistic regression) · Ch 5–6 (CV, AIC) · Ch 7 (splines and GAMs) |
How they are built¶
The sources live in
Chapters/Advanced/
— one folder per deck with its LaTeX source, its make_figures.py (every
figure is computed from the course datasets or a seeded simulation) and the
compiled PDF; the notebooks ship with stored outputs and run on Colab with one
click, resolving data exactly like the course labs. From the
repository root, make advanced rebuilds any deck whose source changed. The
folder also carries the distilled style guides (STYLE_DECK.md,
STYLE_NOTEBOOK.md) used to author them — the starting point for adding a
module A5.
All advanced notebooks¶
Where to go next¶
Lecture slides — the twelve course decks these modules extend.
Lab notebooks — the course labs, built to the same pattern.
The course at a glance — where the twelve-lecture plan ends and these begin.
Repository layout — where everything lives.