The Great Mental Models of Machine Learning 20 lectures

A lecture series  ·  Revised July 2026  ·  In the tradition of Stanford CS229

The Great Mental Models of Machine Learning

Every other series on this site studies a specific model. This one studies the question underneath all of them: given a finite sample and an infinite space of possible explanations, what can you actually prove about the one you fit? Full derivations, not just mechanisms — θ, hθ(x), and J(θ) throughout, in the notation the field actually uses.

Scroll slowly ↓

A model that perfectly explains the data you have and a model that generalizes to data you don't are not the same object — and the entire discipline of learning theory exists because that gap is measurable before you ever see new data.
Linear and logistic regression, SVMs, decision trees, and neural networks look like different tools. They are the same wager made four different ways: assume a hypothesis class, fit it by an optimization, and pay a provable price in generalization for however expressive that class was allowed to be. This series makes that wager explicit every time, with the maths worked out in full.
I

The generalization problem

A model can memorize its training set perfectly and still fail on the next example. Every regularizer and every learning-theory bound is a response to this one fact.

II

The optimization problem

Most of the objectives worth minimizing have no closed form. Gradient descent, Newton's method, coordinate ascent, and EM are four different ways of climbing a hill you can't see the top of.

III

The labels problem

Labeled data is expensive and sometimes doesn't exist. Generative models, clustering, and dimensionality reduction are what you reach for when supervision runs out.