Lectures

Each lecture lists its reading first (slides and cheat sheet), then its one-minute videos, then practice: notebooks and interactive apps. Slides and notebooks come from ml-teaching, which also lists all slides and all notebooks.

NotesSlidesCheat sheetShort videoNotebookInteractive labReading

Foundations

Lectures 1–2

Prerequisite test

An open-book test on Python, linear algebra, probability and calculus, required to enrol.

Lecture 01

Introduction and logistics

What machine learning is, how the course runs, and a tour of what current models can do.

Lecture 02

Conventions, metrics, classification and regression

Notation for data, train and test sets, the confusion matrix, accuracy, precision and recall, and errors for regression.

Trees, model fit and ensembles

Lectures 3–7
Lecture 03

Decision trees I

Entropy, information gain, and growing a tree one greedy question at a time.

Lecture 04

Decision trees II

Real-valued inputs and outputs, Gini impurity, and how depth leads to overfitting.

Lecture 05

Bias and variance I; cross-validation

Underfitting and overfitting, the bias-variance decomposition, k-fold cross-validation and tuning hyperparameters.

Lecture 06

Ensemble learning

Bagging, random forests and boosting, and why a vote of many models beats one.

Lecture 07

Decision tree pruning; bias and variance II

Cutting a grown tree back, and a second look at the bias-variance trade-off.

Linear models and optimisation

Lectures 8–15
Lecture 08

Maths for ML

Gradients of linear and quadratic forms, rank, contour plots, and the time complexity of decision trees.

Lecture 09

Linear regression I

Least squares, the normal equation, and what one outlier does to the fit.

Lecture 10

Linear regression II

The geometric view, basis functions, multicollinearity and dummy variables.

Lecture 11

Gradient descent

From Taylor series to the update rule, the step size, and batch, mini-batch and stochastic gradient descent.

Lecture 12

Movie recommendation and matrix factorisation

Filling in a ratings matrix with low-rank factors, fit by alternating least squares or gradient descent.

Lecture 13

Ridge regression

A penalty on large weights: the closed form, shrinkage and choosing the penalty.

Lecture 14

Lasso regression

The L1 penalty and sparse weights, subgradients, coordinate descent and feature selection.

Lecture 15

Constrained optimisation

Lagrange multipliers and the KKT conditions.

Classification

Lectures 16–19
Lecture 16

Logistic regression I

The sigmoid, odds and the decision boundary, and why linear regression fails for classes.

Lecture 17

Logistic regression II

Cross-entropy from maximum likelihood, its gradient, and softmax for many classes.

Lecture 18

Convexity, Hessians and IRLS

Tutorial: testing convexity, Newton's method, and iteratively reweighted least squares.

Lecture 19

Precision-recall curves

Thresholds, the precision-recall trade-off, average precision and ROC curves.

Neural networks

Lectures 20–26
Lecture 20

Multi-layer perceptrons

Perceptrons, XOR and hidden layers, activations, and the forward pass as matrices.

Lecture 21

Automatic differentiation

Computation graphs, the chain rule, and forward versus reverse mode.

Lecture 22

Autograd from scratch

Building a small reverse-mode autograd engine in Python.

Lecture 23

Next-token prediction

A character-level model of names: embeddings, an MLP, and sampling.

Lecture 24

Convolutional networks I

Convolution as a sliding dot product, stride, padding, pooling, weight sharing and LeNet.

Lecture 25

Grad-CAM, equivariance and invariance

Seeing which pixels a CNN relies on, and how convolution treats shifted inputs.

Lecture 26

Pretrained features with DINOv3

Using a frozen vision model's features for search, classification and regression.

Unsupervised and reinforcement learning

Lectures 27–29
Lecture 27

Unsupervised learning: clustering

K-means and choosing k, and clustering by density.

Lecture 28

Principal component analysis

Tutorial: directions of maximum variance, eigenvectors of the covariance, and explained variance.

Lecture 29

Reinforcement learning

Agents and rewards, returns, value functions, Q-learning and exploration.

Neighbours and support vector machines

Lectures 30–33
Lecture 30

K-nearest neighbours

Distance metrics, choosing k, the curse of dimensionality and approximate search.

Lecture 31

Support vector machines I

The maximum-margin classifier, its dual, and support vectors.

Lecture 32

Support vector machines II: kernels

Feature maps, the kernel trick, and polynomial and RBF kernels.

Lecture 33

Support vector machines III: soft margin

Slack variables, the C parameter and the hinge loss.

Also in the series

3 topics

Naive Bayes and Bayesian networks

Bayes' rule for classification, conditional independence, and smoothing counts.

Time series and sequence models

Forecasting baselines, autoregression, and recurrent networks.

Object detection

Bounding boxes and how much two of them overlap.

Slides are the PDF handouts used in class. Cheat sheets are two-page A4 summaries. Each one-minute video answers one question, given as its title.