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.
Foundations
Lectures 1–2Trees, model fit and ensembles
Lectures 3–7Linear models and optimisation
Lectures 8–15| Lecture 08 | Maths for MLGradients of linear and quadratic forms, rank, contour plots, and the time complexity of decision trees. |
|
| Lecture 09 | Linear regression ILeast squares, the normal equation, and what one outlier does to the fit. |
|
| Lecture 10 | Linear regression IIThe geometric view, basis functions, multicollinearity and dummy variables. |
|
| Lecture 11 | Gradient descentFrom Taylor series to the update rule, the step size, and batch, mini-batch and stochastic gradient descent. |
f(x) = x², start at x = 4, step size 0.1. Where is x after one gradient descent step?f(x) = x², start at 4, step size 1.1. Does gradient descent reach the bottom?Each step nudges a line toward one random point. Does the error drop every step?Gradient descent stops where the slope is 0. Is that the lowest point? |
| Lecture 12 | Movie recommendation and matrix factorisationFilling in a ratings matrix with low-rank factors, fit by alternating least squares or gradient descent. |
|
| Lecture 13 | Ridge regressionA penalty on large weights: the closed form, shrinkage and choosing the penalty. |
|
| Lecture 14 | Lasso regressionThe L1 penalty and sparse weights, subgradients, coordinate descent and feature selection. |
|
| Lecture 15 | Constrained optimisationLagrange multipliers and the KKT conditions. |
Classification
Lectures 16–19| Lecture 16 | Logistic regression IThe sigmoid, odds and the decision boundary, and why linear regression fails for classes. |
|
| Lecture 17 | Logistic regression IICross-entropy from maximum likelihood, its gradient, and softmax for many classes. |
|
| Lecture 18 | Convexity, Hessians and IRLSTutorial: testing convexity, Newton's method, and iteratively reweighted least squares. |
|
| Lecture 19 | Precision-recall curvesThresholds, the precision-recall trade-off, average precision and ROC curves. |
Neural networks
Lectures 20–26| Lecture 20 | Multi-layer perceptronsPerceptrons, XOR and hidden layers, activations, and the forward pass as matrices. |
Weights 1 and 1, bias -1.5: which logic gate is this neuron?Can one straight line put the blue points on one side and the amber on the other?What is the fewest number of straight lines that separates XOR?Two layers with no activation, y = 3 · (2x). More powerful than one layer?784 inputs, 100 hidden units, 1 output. How many numbers does the network learn? |
| Lecture 21 | Automatic differentiationComputation graphs, the chain rule, and forward versus reverse mode. |
|
| Lecture 22 | Autograd from scratchBuilding a small reverse-mode autograd engine in Python. |
|
| Lecture 23 | Next-token predictionA character-level model of names: embeddings, an MLP, and sampling. |
|
| Lecture 24 | Convolutional networks IConvolution as a sliding dot product, stride, padding, pooling, weight sharing and LeNet. |
|
| Lecture 25 | Grad-CAM, equivariance and invarianceSeeing which pixels a CNN relies on, and how convolution treats shifted inputs. |
|
| Lecture 26 | Pretrained features with DINOv3Using a frozen vision model's features for search, classification and regression. |
Unsupervised and reinforcement learning
Lectures 27–29| Lecture 27 | Unsupervised learning: clusteringK-means and choosing k, and clustering by density. |
|
| Lecture 28 | Principal component analysisTutorial: directions of maximum variance, eigenvectors of the covariance, and explained variance. |
|
| Lecture 29 | Reinforcement learningAgents and rewards, returns, value functions, Q-learning and exploration. |
Neighbours and support vector machines
Lectures 30–33| Lecture 30 | K-nearest neighboursDistance metrics, choosing k, the curse of dimensionality and approximate search. |
New fruit: orange or apple? Its 3 nearest neighbours vote.k-NN uses height (metres) and income (rupees). Which one decides who is nearest?Point A is at (3, 0), point B at (2, 2). Which is nearer to (0, 0)?A ball just fits inside a cube. In 10 dimensions, how much of the cube does it fill?A million stored points: must k-NN compare a new point with every one? |
| Lecture 31 | Support vector machines IThe maximum-margin classifier, its dual, and support vectors. |
|
| Lecture 32 | Support vector machines II: kernelsFeature maps, the kernel trick, and polynomial and RBF kernels. |
|
| Lecture 33 | Support vector machines III: soft marginSlack variables, the C parameter and the hinge loss. |
Also in the series
3 topicsNaive Bayes and Bayesian networksBayes' rule for classification, conditional independence, and smoothing counts. |
||
Time series and sequence modelsForecasting baselines, autoregression, and recurrent networks. |
||
Object detectionBounding 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.