Machine Learning
Regression, gradient descent, classifiers, trees, SVMs, clustering, PCA, overfitting and evaluation.
14 animated lectures · 39 minutes
▶ Start with lecture 1What Is Machine Learning?
Instead of writing rules, show the computer examples. The core idea of machine learning, its three main types and the standard workflow.
Linear Regression, Visually
Fit a straight line to data with gradient descent. Watch the residuals shrink and the mean squared error fall from 9.45 to 0.55.
Gradient Descent and the Learning Rate
How almost every ML model learns: follow the slope downhill. See small, good and too-large learning rates, and how optimisers like Adam move on a loss surface.
Linear Classifiers: Logistic Regression and the Perceptron
Draw a line that separates two classes. Watch logistic regression learn a probabilistic boundary and the perceptron nudge its line towards mistakes.
k-Nearest Neighbours: Learning by Similarity
Classify a new point by asking its closest neighbours to vote. Simple, intuitive and a great first classifier.
Decision Trees and Random Forests
A tree learns yes/no questions that carve the data into pure regions. A forest of trees votes for more robust predictions.
Support Vector Machines and the Kernel Trick
Of all the lines that separate two classes, pick the widest street. Then lift the data into a new dimension to separate what a line cannot.
k-Means Clustering, Step by Step
Unsupervised learning in action: assign points to the nearest centroid, move each centroid to its points’ average, repeat.
Principal Component Analysis (PCA)
Find the direction in which data varies most, then project onto it. Watch two dimensions become one while keeping 93.5% of the variance.
Overfitting, Underfitting and Bias–Variance
Too simple, just right, too complex: see three models on the same data and why validation error — not training error — tells the truth.
Train/Test Splits and Cross-Validation
Why data is split into training, validation and test sets — and how k-fold cross-validation gives a more reliable score.
Confusion Matrix, Precision, Recall and ROC
Accuracy alone can mislead. Build a confusion matrix, compute precision, recall and F1, then move the threshold and trace an ROC curve.
Gradient Descent and Optimisation: A Deep Dive
Everything about how models are fitted: loss functions, learning rates, batch vs stochastic gradient descent, momentum, Adam and AdamW, schedules, conditioning and feature scaling, saddle points and practical tuning.
Evaluating Machine Learning Models: A Deep Dive
How to know whether a model is really good: train/validation/test splits, cross-validation, confusion matrices, precision, recall and F1, ROC and PR curves, calibration, regression metrics, bias–variance, learning curves and leakage.