๐งฎ How Models Work
Step-by-step walkthroughs of how these models actually compute their outputs โ the formulas, the shapes, and the numbers worked out by hand, with no code shown.
1. Foundations
What learning is, how to measure it, and how the step is taken
Exploratory Data Analysis
The four assumptions under every statistic you will compute, and the one figure that checks all of them
Beginner
Open โ
How Models Learn: The Concepts
Loss, gradient, learning rate, bias, variance, overfitting - defined with numbers you can check
Beginner
Open โ
Evaluation Metrics
Why accuracy lies on imbalanced data, and what to read instead
Beginner
Open โ
Optimisers: SGD to Adam
Momentum, RMSProp and Adam built up one fix at a time
Intermediate
Open โ
Reinforcement Learning
No labels, delayed reward, and a policy that decides its own training data
Intermediate
Open โ
2. Validation & Model Selection
Knowing whether it works, and not fooling yourself
Cross-Validation & Model Selection
One split is a sample, not a measurement - and choosing between models spends the folds you chose on
Beginner
Open โ
Data Leakage
Five ways a validation score stops measuring what you think, each one built and then measured
Beginner
Open โ
Hyperparameter Search
Why random search beats grid search, and what Expected Improvement is actually computing
Intermediate
Open โ
Probability Calibration
When the model says 0.70, does it happen 70% of the time? AUC cannot tell you
Intermediate
Open โ
3. Linear Models
A weighted sum, and what changes when you squash it
4. Instance & Probabilistic
Learn nothing in advance; compare, or count
5. Trees & Ensembles
Ask questions, then combine many answers
Decision Tree
Greedy recursive partitioning, with every candidate split scored by hand
Beginner
Open โ
Random Forest
Bootstrap, feature subsampling, and why averaging decorrelated trees kills variance
Beginner
Open โ
AdaBoost
Boosting by reweighting the data, not by fitting gradients
Intermediate
Open โ
Gradient Boosting from Scratch
Fit the negative gradient - and why "fit the residual" is only the squared-error special case
Intermediate
Open โ
Stacking & Blending
Train a model to combine models - and why out-of-fold predictions are the whole method
Intermediate
Open โ
Feature Importance & SHAP
Three methods, three different questions - and the default one is measurably biased
Intermediate
Open โ
XGBoost
Second-order Taylor expansion, similarity scores, and the closed-form gain
Advanced
Open โ
LightGBM
Histogram binning, leaf-wise growth, and GOSS - the same math, a faster search
Advanced
Open โ
CatBoost
Ordered target statistics, ordered boosting, and oblivious trees
Advanced
Open โ
6. Kernel Methods
Widest margin, and inner products in disguise
7. Unsupervised Learning
No labels: find structure, or compress
K-Means
Lloyd's algorithm, iteration by iteration, and why it always converges
Beginner
Open โ
Gaussian Mixtures & EM
Soft assignment, real covariance, and k-means as the limiting case
Advanced
Open โ
Principal Component Analysis
Rotate the axes onto the directions of greatest variance
Intermediate
Open โ
Autoencoders
Compress through a bottleneck - and a linear one is exactly PCA
Intermediate
Open โ
8. Neural Networks
Layers, weight sharing, memory
Neural Network & Backpropagation
The chain rule with its intermediate results kept - and gradient-checked
Intermediate
Open โ
Convolutional Networks
Slide a small set of weights everywhere - parameter sharing and its prior
Intermediate
Open โ
RNN & LSTM
Memory across time, why its gradient dies, and how gates rescue it
Advanced
Open โ
9. Transformers & Attention
Drop recurrence, attend to everything at once
Tokenization: Byte-Pair Encoding
How text becomes the integers every transformer page starts from
Beginner
Open โ
BERT on EEG
Bidirectional masked reconstruction - the same encoder, no causal mask, a signal instead of text
Intermediate
Open โ
Autoregressive Transformer: Encoder + Decoder
Every matrix multiplication, formula, and manual calculation behind a from-scratch NumPy Transformer
Intermediate
Open โ
Kimi K3: Delta Attention, Attention Residuals, LatentMoE
A 2026 frontier architecture taken apart equation by equation - linear attention with a bounded forget gate, and a routed MoE that stays stable
Advanced
Open โ
DeepSeek-V4: Compressed Sparse Attention and Muon
How a million-token context is made to fit - compression, sparse selection, and a residual stream that cannot amplify
Advanced
Open โ
RLHF, GRPO & Constitutional AI
What happens after pretraining - the stage that turns a text continuer into an assistant
Advanced
Open โ
GLM-5 & GLM-5.3-Flash
The frontier architecture that publishes its failures - and retrofits sparse attention instead of pre-training it
Advanced
Open โ
Self-Improving LLMs
A model generating its own training data - and the four ways that loop quietly breaks
Advanced
Open โ