Playgrounds
Change an input, watch the model respond, and inspect the calculation behind the result.
Concept filters
42 labs
Foundations
Bias–variance trade-off
A more flexible curve can follow the signal better while becoming more sensitive to the particular training sample.
Start with Linear Regression (OLS), Train/Test Split & CV.
5 stagesTrain/Test Split & CV
A held-out score is only as honest as the split and fitting procedure behind it.
4 stagesImage Kernels
Each output cell is the sum of the nine pixel–weight products under its window.
4 stagesHough Transform
Each point votes for possible lines; shared accumulator bins collect evidence for the same hypothesis.
Start with Image Kernels.
4 stagesLinear Regression (OLS)
Least squares chooses the line that minimises squared vertical residuals for the observed points.
4 stages
Supervised Learning
Gradient Descent
The gradient measures local change; descent subtracts the learning-rate-scaled gradient and measures the actual result.
Start with Linear Regression (OLS).
7 stagesDecision Trees
Each question divides the training observations reaching one node; leaf votes turn those questions into predictions.
Start with Train/Test Split & CV.
4 stagesSupervised Ensembles: Random Forests & Boosting
An ensemble combines actual learner predictions; bootstrap sampling, feature restrictions and sequential weighting create different voting rules.
Start with Decision Trees, Train/Test Split & CV.
5 stagesSupport Vector Machines
A soft-margin fit balances a small weight norm against training points falling short of their functional margin.
Start with Logistic Regression & Decision Boundaries.
4 stagesLogistic Regression & Decision Boundaries
Change the classification threshold and watch its decision boundary move across the probability surface.
Start with Linear Regression (OLS), Gradient Descent.
3 stagesk-Nearest Neighbors
Change the distance metric or neighbour count and watch the votes reshape the decision boundary.
Start with Train/Test Split & CV.
3 stagesNaive Bayes Classifier
A class prior and count-weighted token likelihoods determine a model posterior, provided some class supports the evidence.
Start with Logistic Regression & Decision Boundaries.
4 stagesRidge & Lasso Regularisation
A coefficient penalty changes the fitted curve; its benefit on new observations must be measured.
Start with Linear Regression (OLS), Train/Test Split & CV.
5 stages
Unsupervised Learning
K-Means Clustering
Assignment holds centres fixed; updating holds memberships fixed. Both minimise the same squared-distance objective, but a fixed point need not be globally optimal.
Start with k-Nearest Neighbors.
5 stagesPrincipal Component Analysis (PCA)
For a fixed centred dataset, variance kept plus mean squared orthogonal reconstruction error is constant; PCA chooses a direction that keeps the most variance.
4 stages
Neural Networks
Perceptron & Activation Functions
A signed observation changes weights and bias together, moving the same boundary that produced its score.
Start with Logistic Regression & Decision Boundaries.
6 stagesMulti-Layer Perceptron
Nonlinear hidden features let an affine output separate patterns that one affine classifier cannot represent.
Start with Perceptron & Activation Functions.
4 stagesBackpropagation
Multiply local Jacobians along each path; add contributions where a value feeds multiple paths.
Start with Perceptron & Activation Functions, Multi-Layer Perceptron.
7 stagesConvolution / CNN
Change the filter and trace the dot product that builds each cell of the output feature map.
Start with Image Kernels.
5 stagesRNN vs LSTM Memory
A direct cell path and a final hidden-output derivative answer different questions: multiply local Jacobians through time and sum the signed contributions at forks.
Start with Backpropagation.
5 stagesBatch Norm & Dropout
Change the batch statistics and dropout mask to see how they affect the same network.
Start with Multi-Layer Perceptron, Backpropagation.
3 stagesSkip / Residual Connections
An activation receives the signed sum of every outgoing reverse path; an identity contribution does not bound the total gradient away from zero.
Start with Backpropagation.
4 stages
Modern ML
Generative AI
LoRA (Low-Rank Adaptation)
The product of two thin matrices has the same shape as the frozen base, but it can express only as many independent update directions as the bottleneck allows.
Start with Multi-Layer Perceptron, Gradient Descent.
4 stagesDiffusion Models
A reverse sampler generates by repeatedly estimating structure and updating a noisy sample.
6 stagesEmbeddings & Vector Space
Original vectors and a chosen metric determine retrieval; a coordinate map and camera determine the picture.
Start with Tokenization (BPE), Principal Component Analysis (PCA).
4 stagesAutoencoder (Bottleneck Compression)
Change the bottleneck width and inspect how many shared templates the decoder can use to rebuild an image.
Start with Principal Component Analysis (PCA).
5 stagesGenerative Adversarial Networks (GANs)
Change how often the discriminator updates and inspect the loss gradient it sends to each generated output.
Start with Logistic Regression & Decision Boundaries, Gradient Descent.
6 stagesTokenization (BPE)
Repeated adjacent symbols form larger tokens through counted, ordered merges, without understanding meaning.
2 stagesFull Transformer Block
Trace how multi-head attention, residual connections and a feed-forward network transform token vectors inside one block.
Start with Attention, Embeddings & Vector Space.
6 stagesRetrieval-Augmented Generation (RAG)
Ranking, a similarity cutoff and a chunk limit decide which evidence reaches the prompt.
Start with Embeddings & Vector Space.
4 stages
Evaluation & RL
Q-Learning
Edit the grid and step through visits to see how a delayed reward changes the value of earlier moves.
3 stagesThreshold, Confusion Matrix & ROC
On fixed scored observations, one threshold assigns predictions that determine every confusion count and metric denominator.
Start with Logistic Regression & Decision Boundaries.
3 stagesPrecision-Recall Curve
ROC measures class-conditional ranking; precision also depends on the class mixture, and one threshold picks linked points from the same observations.
Start with Threshold, Confusion Matrix & ROC.
3 stagesPolicy Gradient
REINFORCE turns sampled returns into changes in the probabilities of future actions.
Start with Q-Learning, Gradient Descent.
3 stagesLearning Curves
A learning curve measures what changes when the same fitting rule receives more observations; its shape is evidence about this experiment.
Start with Train/Test Split & CV, Bias–variance trade-off.
3 stages
Optimizers
SGD, momentum and Adam
An optimiser combines the current gradient with its own memory to choose an actual displacement.
Start with Gradient Descent.
4 stagesLearning Rate Scheduling
A schedule chooses the multiplier for each next gradient update; its effect is measured by the actual objective after a stated budget.
Start with Gradient Descent.
4 stages
Computer Vision
Pooling (Max & Average)
Shift an input feature and trace how crossing a pooling window changes the output.
Start with Convolution / CNN.
4 stagesIoU & Non-Max Suppression
IoU measures shared geometry; greedy NMS decides which scored boxes remain under an explicit overlap rule.
Start with Convolution / CNN.
3 stagesData Augmentation
Change an image transform and trace which source pixels and value adjustments produce each output.
Start with Convolution / CNN.
3 stages