The Foundations series, in reading order

33 articles explaining the core ideas of data science and AI from scratch. Each article stands alone, but they were written to build on each other, and the publication dates follow the source material rather than the reading order — so this page is the order that makes sense.

Pick the track that matches what you are stuck on. Within a track, read top to bottom.

Before any of the maths

Three habits that decide whether the rest of it helps you. No prerequisites, and worth reading even if you skip every other track.

  1. Part 1 The job is mostly cleaning data, and no one warns you What the work actually consists of, versus what the tutorials show.
  2. Part 2 Always build the dumb baseline first The number every later model has to beat before anyone celebrates.
  3. Part 3 Start with the simplest model that could possibly work Why the simplest model that could work is the one to try first.

Reasoning under uncertainty

Start here if the statistics never quite clicked. Nothing below assumes anything above it except plain arithmetic.

  1. Part 4 The Monty Hall problem, and why switching wins Why conditioning on how information arrived changes the answer.
  2. Part 5 Bayes theorem from first principles The same move, generalised. Builds on Monty Hall.
  3. Part 6 The central limit theorem, from first principles Why the normal distribution turns up everywhere, and what it does not promise.
  4. Part 7 P-values: what they say and what they do not What the number means. Easier after the central limit theorem.
  5. Part 8 Monte Carlo methods: answering hard questions by rolling dice When simulating beats solving.
  6. Part 9 Entropy, or how to measure surprise Information as surprise — the source of the loss functions used later.
  7. Part 10 Markov chains, from states to stationary distributions Processes with a state and no memory.

Reading data honestly

What a number can and cannot support. No maths beyond the first track.

  1. Part 11 Correlation is not causation, but The three explanations for any correlation.
  2. Part 12 Simpson's paradox from first principles When the aggregate and every subgroup disagree.
  3. Part 13 Automation and jobs: picking the right unit of analysis Picking the right unit of analysis for a contested question.

Models that learn from tables

The workhorses. Read the bias-variance piece early — everything after it refers back.

  1. Part 14 Overfitting and the bias-variance tradeoff The one idea the rest of machine learning is organised around.
  2. Part 15 Logistic regression from first principles The simplest honest classifier. Uses entropy from track one.
  3. Part 16 Decision trees and random forests, from the split up Splitting, and why averaging many trees works.
  4. Part 17 Gradient boosting, built one mistake at a time Fitting the errors of the last model. Assumes trees.
  5. Part 18 K-means clustering, and what it is really doing Structure without labels.
  6. Part 19 PCA explained from first principles Fewer dimensions, most of the variance.

Neural networks

Strictly sequential — each one assumes the one before it.

  1. Part 20 What a neural network actually is Weights, layers, activations. Start here.
  2. Part 21 Gradient descent from first principles How the weights get set.
  3. Part 22 Backpropagation explained plainly How the gradient is computed cheaply.
  4. Part 23 Convolution, and how computers learned to see The architecture that made vision work.
  5. Part 24 What word embeddings really are Turning words into geometry.

Generative models and LLMs

Assumes the neural networks track, particularly embeddings.

  1. Part 25 Transformers explained from scratch The architecture behind every current language model.
  2. Part 26 Attention is the whole trick The mechanism inside it. Read the transformer piece first.
  3. Part 27 What a language model is actually doing What next-token prediction produces.
  4. Part 28 How a model gets trained, from pretraining to RLHF Base model to assistant, stage by stage.
  5. Part 29 Why prompting works at all Why the wording changes the output.
  6. Part 30 Why language models make things up The failure mode, and what actually reduces it.
  7. Part 31 How diffusion models make images Generation by removing noise.
  8. Part 32 GANs, and why deepfakes work The older generative idea, and why images stopped being evidence.
  9. Part 33 Reinforcement learning, and what AlphaGo taught Learning from reward instead of labels.