LabsSemesters 1 and 2

The labs

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

Every lab runs like a training loop

Each pass is an epoch. Your work converges.

The lab loop: read the brief and open the starter once, then implement, check, submit, get graded by hidden tests and see your score, and go round again until you pass.0102briefstarteriterate0304050607implementchecksubmithidden testsscoreepoch →
  1. 01

    Read the brief data

    The goal, the data, what gets graded.

  2. 02

    Open the starter init

    Notebook and terminal on your lab machine.

  3. 03

    Implement forward

    Fill in the functions, part by part.

  4. 04

    Check as you go loss

    Run each part’s check cell straight away.

  5. 05

    Submit step

    Your notebook goes to the grader.

  6. 06

    Hidden tests eval

    Checked against a reference, on unseen data.

  7. 07

    Score and iterate gradient

    Fix what failed. Your best score counts.

02Every lab

Subject by subject

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.

Semester 1: Foundations

Linear Algebra & Calculus for ML

3 credits · 90 h · 8 chapters · 5 labs

  1. L1

    Finding similar documents with vectors

    After chapter 1 · about 7 hours · Runs on a CPU

  2. L2

    LU decomposition from scratch

    After chapter 3 · about 7 hours · Runs on a CPU

  3. L3

    Eigenvectors and a tiny PageRank

    After chapter 5 · about 7 hours · Runs on a CPU

  4. L4

    Compressing images with the SVD

    After chapter 6 · about 7 hours · Runs on a CPU

  5. L5

    Gradients by hand and by finite differences

    After chapter 8 · about 7 hours · Runs on a CPU

Probability & Statistics for ML

3 credits · 90 h · 9 chapters · 5 labs

  1. L1

    Probability by simulation

    After chapter 2 · about 7 hours · Runs on a CPU

  2. L2

    Distributions from scratch

    After chapter 4 · about 7 hours · Runs on a CPU

  3. L3

    The CLT and the bootstrap

    After chapter 7 · about 7 hours · Runs on a CPU

  4. L4

    Hypothesis tests from scratch

    After chapter 8 · about 7 hours · Runs on a CPU

  5. L5

    Designing and analysing an A/B test

    After chapter 9 · about 7 hours · Runs on a CPU

Foundations of Machine Learning

4 credits · 120 h · 12 chapters · 5 labs

  1. L1

    Linear regression three ways

    After chapter 3 · about 8 hours · Runs on a CPU

  2. L2

    Fighting overfitting

    After chapter 4 · about 8 hours · Runs on a CPU

  3. L3

    A screening classifier

    After chapter 6 · about 8 hours · Runs on a CPU

  4. L4

    Trees, forests and boosting

    After chapter 9 · about 8 hours · Runs on a CPU

  5. L5

    Structure without labels

    After chapter 11 · about 8 hours · Runs on a CPU

Classical AI: Search, Logic & Reasoning

2 credits · 60 h · 8 chapters · 5 labs

  1. L1

    Route finding on a rail map

    After chapter 3 · about 5 hours · Runs on a CPU

  2. L2

    A game-playing agent

    After chapter 4 · about 5 hours · Runs on a CPU

  3. L3

    A SAT solver from scratch

    After chapter 5 · about 5 hours · Runs on a CPU

  4. L4

    Inference in a Bayesian network

    After chapter 7 · about 5 hours · Runs on a CPU

  5. L5

    Planning in a grid world

    After chapter 8 · about 5 hours · Runs on a CPU

Data Engineering & Databases for ML

2 credits · 60 h · 8 chapters · 5 labs

  1. L1

    From ER diagram to a working schema

    After chapter 1 · about 5 hours · Runs on a CPU

  2. L2

    Answering questions with SQL

    After chapter 3 · about 5 hours · Runs on a CPU

  3. L3

    Normal forms from scratch

    After chapter 4 · about 5 hours · Runs on a CPU

  4. L4

    Indexes and query plans

    After chapter 5 · about 5 hours · Runs on a CPU

  5. L5

    A mini warehouse and ML pipeline

    After chapter 8 · about 5 hours · Runs on a CPU

Semester 2: Deep learning core

Neural Networks & Deep Learning

4 credits · 120 h · 12 chapters · 5 labs

  1. L1

    Backpropagation by hand: a NumPy MLP for digits

    After chapter 2 · about 9 hours · Runs on a CPU

  2. L2

    Build a reverse-mode autodiff engine

    After chapter 3 · about 10 hours · Runs on a CPU

  3. L3

    Making deep networks train: initialisation, normalisation, regularisation and a broken loop

    After chapter 8 · about 10 hours · Runs on a CPU

  4. L4

    Convolutions from scratch and a small residual network

    After chapter 11 · about 10 hours · Runs on a CPU

  5. L5

    Embeddings and learned representations

    After chapter 12 · about 10 hours · Runs on a CPU

Optimisation & Training at Scale

2 credits · 60 h · 6 chapters · 5 labs

  1. L1

    Gradient descent and SGD under the microscope

    After chapter 2 · about 5 hours · Runs on a CPU

  2. L2

    Optimisers from scratch: momentum, Nesterov, RMSProp, Adam and AdamW

    After chapter 3 · about 5 hours · Runs on a CPU

  3. L3

    Schedules, reproducible runs and the edge of stability

    After chapter 4 · about 6 hours · Runs on a CPU

  4. L4

    Mixed precision on a CPU

    After chapter 5 · about 5 hours · Runs on a CPU

  5. L5

    Memory accounting and parallel training on one core

    After chapter 6 · about 6 hours · Runs on a CPU

Sequence Models & Transformers

4 credits · 120 h · 12 chapters · 5 labs

  1. L1

    Language models and word vectors from counts and from prediction

    After chapter 2 · about 9 hours · Runs on a CPU

  2. L2

    Recurrent networks from scratch: BPTT, vanishing gradients and gated cells

    After chapter 4 · about 10 hours · Runs on a CPU

  3. L3

    Normalising dates with an attentive encoder-decoder

    After chapter 6 · about 10 hours · Runs on a CPU

  4. L4

    A small Transformer language model from scratch

    After chapter 9 · about 10 hours · Runs on a CPU

  5. L5

    Decoding, KV caching and efficient attention

    After chapter 11 · about 10 hours · Runs on a CPU

Responsible AI, Ethics & Governance

2 credits · 60 h · 6 chapters · 5 labs

  1. L1

    Data, targets and proxies

    After chapter 1 · about 5 hours · Runs on a CPU

  2. L2

    Fairness audit and mitigation

    After chapter 2 · about 6 hours · Runs on a CPU

  3. L3

    Explanations from scratch: importance, Shapley values and recourse

    After chapter 3 · about 5 hours · Runs on a CPU

  4. L4

    Breaking and protecting privacy

    After chapter 4 · about 5 hours · Runs on a CPU

  5. L5

    Release review for a PIN-code digit reader: robustness, shift and incident readiness

    After chapter 6 · about 5 hours · Runs on a CPU

See the programmeHow grading works