Linear Algebra & Calculus for ML
- L1
Finding similar documents with vectors
- L2
LU decomposition from scratch
- L3
Eigenvectors and a tiny PageRank
- L4
Compressing images with the SVD
- L5
Gradients by hand and by finite differences
LabsSemesters 1 and 2
45 graded labs across the two core semesters. Each one is a notebook you complete on your own cloud lab machine, checked part by part as you go and graded by hidden tests when you submit.
A brief
The goal, the data, the tasks in order, and the exact functions that are graded.
A starter notebook
It opens on your own cloud lab machine, beside a terminal, with every library installed.
Real or synthetic data
Bundled datasets, seeded synthetic data or small files with a recorded licence. Nothing to download.
A check for every part
Cells you run as you go, so you know a part works before you build on it.
Hidden tests
Run in a sandbox with one CPU core and no internet, against a reference and on held-out data.
A written report
A few why-questions, answered with the numbers you measured in your own runs.
01The lab loop
Each pass is an epoch. Your work converges.
The goal, the data, what gets graded.
Notebook and terminal on your lab machine.
Fill in the functions, part by part.
Run each part’s check cell straight away.
Your notebook goes to the grader.
Checked against a reference, on unseen data.
Fix what failed. Your best score counts.
02Every lab
Labs belong to subjects, a few per subject, each after the chapter it practises. Semesters 3 and 4 are planned; their labs will be listed here when they are published.
Finding similar documents with vectors
LU decomposition from scratch
Eigenvectors and a tiny PageRank
Compressing images with the SVD
Gradients by hand and by finite differences
Probability by simulation
Distributions from scratch
The CLT and the bootstrap
Hypothesis tests from scratch
Designing and analysing an A/B test
Linear regression three ways
Fighting overfitting
A screening classifier
Trees, forests and boosting
Structure without labels
Route finding on a rail map
A game-playing agent
A SAT solver from scratch
Inference in a Bayesian network
Planning in a grid world
From ER diagram to a working schema
Answering questions with SQL
Normal forms from scratch
Indexes and query plans
A mini warehouse and ML pipeline
Backpropagation by hand: a NumPy MLP for digits
Build a reverse-mode autodiff engine
Making deep networks train: initialisation, normalisation, regularisation and a broken loop
Convolutions from scratch and a small residual network
Embeddings and learned representations
Gradient descent and SGD under the microscope
Optimisers from scratch: momentum, Nesterov, RMSProp, Adam and AdamW
Schedules, reproducible runs and the edge of stability
Mixed precision on a CPU
Memory accounting and parallel training on one core
Language models and word vectors from counts and from prediction
Recurrent networks from scratch: BPTT, vanishing gradients and gated cells
Normalising dates with an attentive encoder-decoder
A small Transformer language model from scratch
Decoding, KV caching and efficient attention
Data, targets and proxies
Fairness audit and mitigation
Explanations from scratch: importance, Shapley values and recourse
Breaking and protecting privacy
Release review for a PIN-code digit reader: robustness, shift and incident readiness