Classical Machine Learning
The classical foundations: how programs learn from examples instead of rules. Linear and logistic regression, trees, ensembles, evaluation discipline, and unsupervised structure — taught the same way as the LLM book: intuition first, a visualization you can play with, then the math.
Foundations
What 'learning' even means, how a model can be wrong, and how it follows that wrongness downhill.
- What learning actually isA program is rules you write by hand. A model is rules the machine extracts from examples. Start there. 7 min · intro
- Loss functionsThe score you optimize secretly decides the model you get. Choose it like you mean it. 7 min · intro
- Gradient descentA slope, a step size, and thousands of downhill steps — the one optimization rule that trained almost everything you've heard of. 9 min · core
- Overfitting, bias, and varianceA model that is perfect on the data you gave it is often useless on data you didn't. Why — and what to do about it. 9 min · core
Supervised learning
The model families: lines that predict numbers, curves that predict labels, neighbors, trees, and margins.
- Linear regression, properlyThe line from chapter 1, but fit by machinery: the closed form, the gradient descent view, and what 'earning' a linear model means. 7 min · core
- Logistic regressionA line that cuts space in half, a sigmoid that turns distance into probability, and the cross-entropy loss that sharpens it. 8 min · core
- Nearest neighborsThrow away modeling entirely: to answer a question, just find the most similar past cases and do what they did. 7 min · core
- Decision treesTwenty questions, played by an algorithm that chooses each question by how much it cleans up the labels. 8 min · core
- Margins and support vectorsLogistic regression picks a separating line and stops. SVMs ask: which separating line is most *robust*? 6 min · advanced
Learning in practice
Everything between 'fit a model' and 'trust a model': splits, validation, features, metrics, and penalties that are chosen on purpose.
- Train/test splitsThe model scores itself on data it studied. Grading has to come from somewhere else — and setting that up wrong is how careers are lost. 7 min · core
- Cross-validationOne split, one glance at luck. K-fold resamples that glance — the standard way to know a score isn't a coin flip. 6 min · core
- Scaling and featuresBefore any model sees your data, you decide what its numbers mean. Get that wrong and the model dutifully learns your mistake. 7 min · core
- Metrics and imbalanceAccuracy is the most confidently-quoting, least informative number in ML. Here's what actually happens when 1% of data matters. 8 min · core
- RegularizationDeliberately handicapping your model can make it better. Here is the dial that builds the right bias on purpose. 8 min · core
Ensembles
Why many mediocre trees beat one careful one — the nonlinear way to buy accuracy: bagging, boosting, and gradient boosting.
- Bagging and random forestsTrain many proud, faulty models on different slices of the data and let them vote. Their errors cancel; their brains accumulate. 7 min · core
- BoostingInvert bagging's geometry: train models *in sequence*, each one obsessed with what the previous ones got wrong. 7 min · core
- Gradient boostingThe boost loop and gradient descent are the same algorithm in two costumes — one on numbers, one on whole functions. 8 min · advanced
Unsupervised structure
When nobody hands you labels: clustering, compression, anomalies, and the geometry that makes similarity itself learnable.
- Clustering: k-meansNo labels, no loss you can verify — just structure hiding in the data. The algorithm that finds it, and the reasons it'll find the wrong structure. 8 min · core
- PCA and dimensionalityYou can't see 50-dimensional data. But you can find the two axes that carry most of what's going on — and know what you gave up. 8 min · advanced
- Anomaly detectionThe rare, the weird, the never-seen-in-training. You can't learn from examples you don't have — so model 'normal' and flag the edges. 7 min · advanced
- Embeddings and similarityEverything in this book ran on hand-picked features. The classical end of the line is learning the features too — and that idea goes all the way up. 8 min · advanced