Learn
Learn machine learning
Ten parts, 52 sessions. Predict a result, try the controls, then compare what happened with your prediction. Explore browser calculations, recorded training runs and small models trained for the course. Each result tells you which it uses.
No coding or prior calculus required. We introduce the maths through small, worked examples. Start with made-up loan applications, then build towards networks and text prediction. Learn how models improve, and how to check whether an improvement holds on new examples. Nothing you type leaves the page.
New to all of this? Start here: a five-minute primer
Explore vision, rewards and model errors
Five optional interactive lessons, open in any order. These experiments sit alongside the 52-session core track; they do not add notebook gates or change your saved progress.
Convolutional neural networks
Move a filter across pixels, inspect a feature map, and compare convolution, ReLU and pooling.
Reinforcement learning
Train a small gridworld agent. Follow one Q-value update, then compare exploration with its learned policy.
Reward hacking
Give a courier the wrong reward. Compare its score with completed deliveries, then repair the incentive.
Hallucination and uncertainty
Compare guessing with abstaining, and check whether evidence actually supports an answer.
Sycophancy
Change the reward for agreeing with a user. See how the preferred answer can change while the fact stays fixed.
Each session ends with a check: reach a target, predict what happens on new examples, or demonstrate the idea yourself. Save your takeaway in the notebook. The short code identifies the session there.
Part 1: Data and the rules of the game
Where the numbers come from, and what a score does not tell you.
1.1 What a prediction is, not yet, available now
1.2 Features: the model only sees columns, not yet, earlier sessions first
1.3 Train, validate, test, not yet, earlier sessions first
1.4 Accuracy, precision, recall, F1, not yet, earlier sessions first
1.5 Accuracy lies, not yet, earlier sessions first
Part 2: Decision trees
Nested cuts you can see, chosen by a search you can check by hand.
2.1 Cuts by hand, not yet, earlier sessions first
2.2 Impurity and splits, not yet, earlier sessions first
D1 Entropy versus Gini on the 14-row weather table, optional deep dive, not yet, earlier sessions first
2.3 Depth and overfitting, not yet, earlier sessions first
2.4 Pruning and instability, not yet, earlier sessions first
D2 Cost-complexity pruning, optional deep dive, not yet, earlier sessions first
2.5 Tree audit, not yet, earlier sessions first
Part 3: Ensembles and random forests
How trees with different errors can make a better prediction together.
3.1 Many weak voters, not yet, earlier sessions first
3.2 Bootstrap and feature bagging, not yet, earlier sessions first
D3 Out-of-bag error as free validation, optional deep dive, not yet, earlier sessions first
3.3 Feature importance, not yet, earlier sessions first
3.4 Forest versus tree, not yet, earlier sessions first
Part 4: Lines, loss and gradients
A weighted sum, a loss that cares about confidence, and a slope.
4.1 The dot product is a score, not yet, earlier sessions first
4.2 Sigmoid and log-loss, not yet, earlier sessions first
4.3 Slope without calculus, not yet, earlier sessions first
4.4 Gradient descent by hand, not yet, earlier sessions first
D4 Momentum and Adam, hand-stepped, optional deep dive, not yet, earlier sessions first
4.5 Softmax and temperature, not yet, earlier sessions first
4.6 Where lines fail, not yet, earlier sessions first
Part 5: Perceptron, MLP and backpropagation
Layers that build features, and the bookkeeping that assigns blame.
5.1 One neuron, not yet, earlier sessions first
5.2 Hidden layers build features, not yet, earlier sessions first
5.3 Activations matter, not yet, earlier sessions first
5.4 Backprop by hand, not yet, earlier sessions first
D5 Every weight of the 2-2-1 network, then the matrix form, optional deep dive, not yet, earlier sessions first
5.5 Initialisation and batches, not yet, earlier sessions first
5.6 Beat the forest, not yet, earlier sessions first
Part 6: Training dynamics
Reading curves: capacity, regularisers, folds and shift.
6.1 The overfitting machine, not yet, earlier sessions first
6.2 Three regularisers, not yet, earlier sessions first
D6 The dataset where dropout hurts, optional deep dive, not yet, earlier sessions first
6.3 Cross-validation, not yet, earlier sessions first
6.4 Distribution shift, not yet, earlier sessions first
6.5 Debug four trainings, not yet, earlier sessions first
Part 7: Sequences: RNN and LSTM
Order as information, a fixed-size state, and a gradient that fades.
7.1 Order is information, not yet, earlier sessions first
7.2 Hidden state, not yet, earlier sessions first
7.3 Vanishing gradients, not yet, earlier sessions first
7.4 LSTM gates, not yet, earlier sessions first
D7 The LSTM's gradient path, optional deep dive, not yet, earlier sessions first
7.5 Train a character model, not yet, earlier sessions first
Part 8: Embeddings, attention and transformers
Co-occurrence as geometry, then a similarity-weighted average.
8.1 Embeddings, not yet, earlier sessions first
8.2 Attention by hand, not yet, earlier sessions first
D8 Two heads of dimension one, by hand, optional deep dive, not yet, earlier sessions first
8.3 Self-attention and heads, not yet, earlier sessions first
8.4 Positional information, not yet, earlier sessions first
8.5 The transformer block, not yet, earlier sessions first
D9 Layer norm by hand and the residual ablation at depth 8, optional deep dive, not yet, earlier sessions first
8.6 Attention versus LSTM, not yet, earlier sessions first
Part 9: Scaling to language models
Subword ids, one distribution at a time, and what scale predicts.
9.1 Tokenisation, not yet, earlier sessions first
D10 The tokeniser and your language, optional deep dive, not yet, earlier sessions first
9.2 Next-token prediction, not yet, earlier sessions first
D11 Top-k, top-p and temperature, optional deep dive, not yet, earlier sessions first
9.3 What scale buys, not yet, earlier sessions first
9.4 Pretraining and fine-tuning, not yet, earlier sessions first
9.5 Mechanism, not mind, not yet, earlier sessions first
9.6 Context windows and retrieval, not yet, earlier sessions first
Part 10: Mixture-of-Experts and capstone
Routing, load balancing, and the pipeline you assemble yourself.
10.1 The router, not yet, earlier sessions first
10.2 Load balancing, not yet, earlier sessions first
D12 Capacity factor and token dropping, optional deep dive, not yet, earlier sessions first
10.3 Capstone, not yet, earlier sessions first
10.4 The map, not yet, earlier sessions first
12 optional deep dives sit beside the sessions. A deep dive opens when its session is done and never blocks anything.