Machine Learning Notes — start here
Track 1 is six notes read in one order: fit a line to numbers, bend it into a probability, stack it into a network, generalise it to many classes, learn to tell when it is going wrong, and finally look at the one model family that works a completely different way. Track 2 takes the labels away — clustering and anomaly detection — and needs almost nothing from track 1 beyond note 1.
In one line. Read them 1 → 6. Each note opens and closes with a strip telling you where you are and what comes next, so you never have to come back here to keep going — but this page is the map when you do. Two appendices sit outside the path.
Why this order
Each note is written assuming the one before it. The dependencies are real, not decorative:
- 2 needs 1. Logistic regression is the linear model $\vec{w}\cdot\vec{x} + b$ with a sigmoid on the end; its gradient descent, learning rate and regularization are the ones derived in note 1.
- 3 needs 2. The reference opens with logistic regression as the single neuron and builds outward from it. Reading it first means meeting the sigmoid and the log loss mid-derivation.
- 4 needs 3. The softmax is the output layer of a network; the note assumes the hidden layers underneath it already make sense.
- 5 needs 4. You cannot diagnose bias and variance in something you cannot yet build.
- 6 stands alone but is placed last on purpose: trees are the contrast, and the note reads much better once the gradient-descent family is familiar. Its entropy is the same quantity as note 4's cross-entropy.
Everything is cross-linked, so a forward reference you meet early is always one click away.
Where the big one splits
Note 3 is a reference, not a lecture — 41 sections in four parts. Jump straight in:
- Part I · The single neuron — §1–16: binary classification, the sigmoid, the loss and cost, derivatives and the computation graph, gradient descent for one neuron, vectorization, broadcasting.
- Part II · The shallow network — §17–26: layer notation, forward propagation, vectorizing across $m$ examples, activation functions and their derivatives, the backprop equations, random initialization.
- Part III · Deep networks — §27–35: $L$-layer notation, matrix dimensions, why depth helps, blocks and caches, parameters vs hyperparameters.
- Part IV · The component view — §36–40: backpropagation derived entry by entry — the scalar chain rule, the sum over paths, and collecting it back into the matrix equations.
- §41 · Where this goes next — regularization, optimization, tuning: what a Part V would cover.
Find it fast
This table is the curated version — the topics worth having a fixed home. For anything else, the search box at the top reads the actual text of every note here and shows you the section it lives in.
| Looking for | It is in |
|---|---|
| Gradient descent, the learning rate $\alpha$, convergence | 1 · linear regression |
| Feature scaling, mean normalization, z-score | 1 · linear regression |
| Polynomial features, the normal equation | 1 · linear regression |
| The sigmoid, log loss, decision boundary, log-odds | 2 · logistic regression |
| Regularization and weight decay | 1 and 2, then reference Part I |
| Forward propagation, one neuron to a layer | reference Part I–II |
| Backpropagation — the equations | reference Part II |
| Backpropagation — derived entry by entry | reference Part IV |
| Activation functions and their derivatives | reference Part II |
| Matrix dimensions in an $L$-layer network | reference Part III |
Softmax, cross-entropy, one-hot, from_logits |
4 · multiclass |
| Adam, multi-label vs multiclass | 4 · multiclass |
| Train/cv/test, bias vs variance, learning curves | 5 · model development |
| Error analysis, data augmentation, transfer learning | 5 · model development |
| Precision, recall, $F_1$, skewed datasets | 5 · model development |
| Entropy, information gain, one-hot for trees | 6 · decision trees |
| Random forests, XGBoost, trees vs networks | 6 · decision trees |
| k-means, centroids, distortion, choosing $K$ | unsupervised 1 · clustering |
| The Gaussian, density estimation, the threshold $\epsilon$ | unsupervised 2 · anomaly detection |
| Anomaly detection vs a classifier (fraud vs spam) | unsupervised 2 · anomaly detection |
| Ratings matrices, $r(i,j)$ and $y^{(i,j)}$, cold start | recommenders · collaborative filtering |
| Learning item features from ratings alone | recommenders · collaborative filtering |
| "People who liked this also liked", related items | recommenders · collaborative filtering |
| Return, discount factor $\gamma$, policies | RL 1 · foundations |
| $Q(s,a)$, $V^\ast(s)$, the Bellman equation, MDPs | RL 1 · foundations |
| Replay buffer, DQN loop, target networks | RL 2 · deep Q-learning |
| $\varepsilon$-greedy exploration and annealing | RL 2 · deep Q-learning |
The appendices — the long way round on backprop
These two are not part of the numbered path, and nothing later depends on them. They were written before the reference and were then merged into its Part IV — so Part IV is the live copy and the one to read first. What survives here is length: Part IV states the derivation, these two walk it, one index and one figure at a time. Read them when Part IV moves faster than you want it to, and read A before B.
If you only read one: Part IV. It is the same derivation, kept current, and it is numbered into the reference's cross-reference scheme. The appendices are kept because deleting a longer explanation you might still want is a bad trade.
Track 2 · Unsupervised learning
Everything in the reading path above was supervised: every training example arrived with the answer attached. This track drops the answers. The data is just $\vec{x}$, and the question changes from "predict $y$" to "what is the structure here?" The two notes ask it two ways: which points belong together, and which points do not belong at all.
Assumes: note 1 (feature scaling, and what a cost function is). Nothing else — you can read this straight after the reading path, or before the network reference if you prefer.
Track 3 · Recommender systems
A third shape of problem: not "predict $y$ from $\vec{x}$", and not "find the structure in $\vec{x}$", but fill in a matrix that is mostly empty. Users rate a few items each, and everything interesting is in the entries nobody supplied.
Assumes: note 1 (it is a linear regression per user) and note 2 for the binary-label variant. Reading track 2 first helps — the item-similarity computation is the same squared distance k-means uses.
Track 4 · Reinforcement learning
No dataset at all. An agent acts, the world answers with a number, and nobody ever says which action was right — the reward for a good decision may arrive hundreds of steps after the decision was made.
Assumes: notes 1 and 3 (gradient descent, and a network to approximate a function with). Nothing from tracks 2 or 3.
As this grows
Track 2 is the pattern for everything that follows. A new subject gets its own track with its own numbering rather than becoming notes 7, 8, 9 — because the dependencies are not a single line, and "note 9 of 12" would claim an ordering that isn't real: a note on policy gradients does not need decision trees.
So this page grows a section per track, each with its own cards and its own "what it assumes" line, and the strip at the top of every note says which track it is in and where. The reading path stays exactly what it is — the way in, for anyone starting from nothing.
That source is now fully covered — all 55 pages of it, across tracks 2, 3 and 4. The next
addition will come from new material, and the obvious candidate is deep learning: convolutions,
sequences, attention. It gets a dl- prefix and a section of its own here.
The folder name survives all of that: deep learning and reinforcement learning are machine learning. It only becomes wrong if something that isn't turns up here.
Not reading material
CLAUDE.md is the authoring guide for this folder (house style, the verify loop, the
gotchas), build-reference.py is the one-time script that bootstrapped the reference — do
not rerun it, it predates Parts III and IV — and images/ holds the figures the notes embed.
Browsing.
/fileslists every note the server can see, which is the quickest way in when you don't know the filename.