Playgrounds
Machine learning you can operate. Every lab makes one normally-invisible idea visible, lets you change it, and shows the consequence immediately — including what happens when you push it until it breaks.
42 of 42 labs are ready to run. The rest are planned.
Foundations
5Bias-Variance Tradeoff
How model complexity drives a tradeoff between capturing the underlying signal (bias) and overreacting to noise (variance).
5 stages
Train/Test Split & CV
A held-out score is only as honest as the split that produced it — how you cut the data decides what the number means.
4 stages
Image Kernels
How a small matrix of weights (a kernel) slides over a larger grid (an image) to compute local features via dot products.
4 stages
Hough Transform
how casting the problem into a parameter space turns line detection into a voting problem: every point that could lie on a given line votes for it, and the lines with the most votes are the ones that are actually there.
4 stages
Linear Regression (OLS)
How Ordinary Least Squares (OLS) balances the pull from every data point to mathematically guarantee the single best-fitting line.
4 stages
Supervised Learning
8Gradient Descent
How a model actually learns: it measures how wrong it is, works out which way to move each parameter to be less wrong, and takes a small step that way.
7 stages
Decision Trees
how a model uses simple axis-aligned splits to isolate classes by reducing impurity.
4 stages
Supervised Ensembles: Random Forests & Boosting
How multiple simple decision trees can collaborate to model complex boundaries without overfitting, and how boosting forces focus on difficult examples.
5 stages
Support Vector Machines
You are seeing the margin boundaries and the hidden higher-dimensional space where a simple flat plane can separate complex patterns.
4 stages
Logistic Regression & Decision Boundaries
A decision boundary is not an intrinsic property of the model; it is just a chosen threshold on top of a continuous probability surface.
3 stages
k-Nearest Neighbors
This model has no equation and learns nothing at training time. Its decision boundary is an emergent shape, produced entirely by asking which labelled points are nearest.
3 stages
Naive Bayes Classifier
How Bayes' rule updates prior beliefs incrementally as independent pieces of evidence (features) are multiplied in.
4 stages
Ridge & Lasso Regularization
A penalty on coefficient size buys generalisation with training error — and L2 shrinks every coefficient towards zero while L1 sets some of them exactly to zero.
5 stages
Unsupervised Learning
2K-Means Clustering
Clustering without labels is a loop of two operations that each improve one thing while holding the other fixed — and it always converges, whether or not it converged to anything sensible.
5 stages
Principal Component Analysis (PCA)
Compressing data to fewer dimensions is a choice of direction, and there is exactly one best choice — because whatever variance a projection keeps, it takes from the error it leaves behind.
4 stages
Neural Networks
7Perceptron & Activation Functions
A neuron is a weighted sum followed by one squashing function — and the slope of that function, not the function itself, is what decides whether learning can happen at all.
5 stages
Multi-Layer Perceptron
How hidden layers and non-linear activations warp the feature space to separate data that a single straight line cannot.
4 stages
Backpropagation
How the chain rule assigns "blame" for errors to individual weights across multiple layers.
7 stages
Convolution / CNN
How a convolutional kernel slides over an image to compute a dot product at each step, building an output feature map cell by cell.
5 stages
RNN vs LSTM Memory
Why information dies as it is passed forward through time: the gradient reaching an early step is a product of one factor per step, and only a gate can hold those factors near 1.
5 stages
Batch Norm & Dropout
What dropout and batch normalisation each actually change — the gap between training and held-out loss, and the spread of the values one layer hands to the next.
3 stages
Skip / Residual Connections
How residual blocks provide a "gradient highway", completely solving the vanishing gradient problem in very deep neural networks.
4 stages
Modern ML
2Attention
Attention is not a metaphor. It is a matrix of real numbers saying how much each token reads from each other token, every row of it sums to exactly one, and the row is spent on a weighted average of what it read.
5 stages
Transformer Decoding
A language model does not choose a word. It hands you a probability distribution over every token it knows, and the decoding strategy is what turns that into text.
5 stages
Generative AI
8LoRA (Low-Rank Adaptation)
How decomposing a massive weight update into two low-rank matrices drastically reduces trainable parameters while maintaining learning capability.
4 stages
Diffusion Models
Generation as an iterative denoising process rather than a one-shot creation.
6 stages
Embeddings & Vector Space
Words are points in a space where distance means similarity and direction carries meaning — and every picture of that space is a projection that hides some of it.
4 stages
Autoencoder (Bottleneck Compression)
A bottleneck of k units forces every image to be rebuilt as a weighted sum of the same k shared templates. The code is only the weights — and how much detail survives is set by how many templates you allow.
5 stages
Generative Adversarial Networks (GANs)
The generator never sees the real data. Everything it learns arrives as a gradient from the discriminator, and that signal is the whole channel between them.
6 stages
Tokenization (BPE)
How models see text as statistically common subword chunks formed by merging frequent character pairs.
2 stages
Full Transformer Block
how a single transformer block processes tokens through multi-head attention and a feed-forward network with residual connections
6 stages
Retrieval-Augmented Generation (RAG)
How a model augments its parametric memory with an external knowledge base by embedding a query, matching it against document embeddings, and injecting the nearest context into its prompt before generation.
4 stages
Evaluation & RL
5Q-Learning
How an agent learns the value of state-action pairs (Q-values) through trial, error, and delayed rewards in an environment.
3 stages
Threshold, Confusion Matrix & ROC
A classifier does not output a class. It outputs a score, and someone chooses where to cut — so accuracy, precision and recall are properties of that choice rather than of the model.
3 stages
Precision-Recall Curve
ROC curves reward models for correctly rejecting the abundant negative class, hiding poor performance on the rare positive class. Precision-Recall curves focus only on what matters: the positives.
3 stages
Policy Gradient
How an agent optimizes its policy probabilities directly based on rewards, rather than estimating Q-values for each state-action pair.
3 stages
Learning Curves
How adding more training data helps a model generalize (lowering validation error) but makes the training set harder to memorize perfectly (raising training error).
3 stages
Optimizers
2Advanced Optimizers
Modern optimizers adapt by remembering past gradients (Momentum) or scaling step sizes (RMSProp), rather than just reacting to the local slope like SGD.
4 stages
Learning Rate Scheduling
how modifying the learning rate over time affects the optimizer's convergence speed and stability
4 stages
Computer Vision
3Pooling (Max & Average)
How discarding spatial precision (shrinking the grid) actually helps the network recognize a feature regardless of its exact pixel location.
4 stages
IoU & Non-Max Suppression
How object detectors clean up their messy predictions by mathematically grouping overlapping boxes and keeping only the most confident one.
3 stages
Data Augmentation
How rotating, shifting, or adding noise to an image forces a neural network to learn the invariant features of an object, rather than memorizing exact pixel layouts.
3 stages