Skip to content
Classical machine learning Foundation 9 min read

What it means to learn from data

Classical machine learning is the study of how a program can get better at a task from examples instead of instructions: choose a family of models, a loss and an algorithm, fit to data, and above all check that the fit carries over to data you have not seen. Every idea in deep learning and LLMs stands on this track.

10,000 ft

Before neural networks took over perception and language, machine learning had already worked out the fundamentals: how to fit a model by minimising a loss, why fitting too well is a failure, how to measure generalisation honestly, how penalties and averaging tame variance, and how to turn messy records into useful inputs. Those ideas did not go away. A language model's output layer is softmax regression; its training loss is the cross-entropy derived on that page; its optimiser's weight decay is ridge regression's penalty; benchmark contamination is the leakage this track teaches you to hunt. And in industry, much of the machine learning that moves money (credit, fraud, pricing, demand forecasting, churn) still runs on tabular features with linear models and gradient-boosted trees. This track gives you the vocabulary and the instincts that the rest of the site assumes.

The learning problem in one picture

Tom Mitchell's 1997 textbook gave the definition most people still quote: "A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E." For a spam filter, T is labelling emails, P is the fraction labelled correctly, and E is a pile of emails people have already marked. The phrase "machine learning" itself is usually credited to Arthur Samuel, whose 1959 checkers program improved by playing against itself.

Made precise, supervised learning has five ingredients, and every page in this track is about one or more of them:

The supervised learning setup
The supervised learning setup. Input distribution p(x) (the world you will be used in), Unknown target p(y | x), Training examples (x₁, y₁) … (xₙ, yₙ), Hypothesis class H (lines, trees, networks…), Loss / metric, Learning algorithm minimise loss + regulariser, Learned model g ≈ target, judged on new xThe supervised learning setup. Input distribution p(x) (the world you will be used in), Unknown target p(y | x), Training examples (x₁, y₁) … (xₙ, yₙ), Hypothesis class H (lines, trees, networks…), Loss / metric, Learning algorithm minimise loss + regulariser, Learned model g ≈ target, judged on new x
  1. An unknown target. Some true relationship between inputs \(\mathbf{x}\) and outputs \(y\), usually noisy, so best thought of as a distribution \(p(y\mid\mathbf{x})\).
  2. Data. \(n\) examples drawn from the world, ideally independently, from the same distribution you will face later.
  3. A hypothesis class. The set of functions you allow yourself: linear maps, trees, kernel machines, networks. Choosing it is choosing an inductive bias.
  4. A loss. A number that says how bad a prediction is. Usually it is the negative log-likelihood of a noise model: squared error for Gaussian noise, cross-entropy for categorical labels (linear regression: first principles).
  5. An algorithm that searches the class for the function with low loss on the data, plus a penalty or other preference for simplicity: empirical risk minimisation with regularisation.

The output is judged not on the training data but on new examples from the same world. That gap, between fitting what you have and predicting what you have not seen, is generalisation, and it is the central question of the field. It is why a 15-parameter polynomial through 15 points is a failure, why bias and variance trade off, why evaluation is a discipline of its own, and why learning theory exists.

Three kinds of experience

  • Supervised learning: examples come with the right answer (a label or a number). Regression and classification. Most of this track.
  • Unsupervised learning: no labels; find structure, such as groups (clustering), low-dimensional directions (PCA and friends) or a density (probabilistic models). Self-supervised learning, which trains LLMs, manufactures labels from the data itself (predict the next token) and then trains exactly like supervised learning.
  • Reinforcement learning: the experience is the consequence of the learner's own actions, a reward rather than a label (the RL track).

Two truths that frame everything

There is no free lunch. Averaged over every conceivable target function, no learning algorithm beats any other, including random guessing (Wolpert, 1996). Learning works in practice only because real-world targets are not arbitrary: they are smooth, sparse, compositional, invariant to some transformations. Every successful method encodes a bet about which; the bet is its inductive bias. "Which model is best?" has no answer without "for which kind of data?".

Two cultures. Leo Breiman (2001) described statisticians who start from a model of how the data were generated, and fit its parameters to understand the mechanism, versus machine learners who treat the mechanism as unknown and judge a model only by its predictive accuracy on held-out data. Modern practice uses both: logistic regression's odds ratios for explanation, gradient boosting or a network for prediction, and the held-out test as the referee. This track keeps both lenses open: every model is derived from a probabilistic story, and every model is judged on unseen data.

Ideas deep learning never stopped using

Classical idea Learn it in Where it lives in modern AI
Least squares, the linear map Linear regression every linear layer; linear probes in interpretability; regression heads
Maximum likelihood, softmax + cross-entropy Logistic regression the LLM pre-training loss; every classifier head; temperature
Gradient descent and conditioning Linear regression optimisers, normalisation layers, why Adam rescales coordinates
Regularisation: weight decay, early stopping Bias, variance and regularisation AdamW's weight decay; dropout; early stopping in fine-tuning
Bias–variance, double descent Bias, variance and regularisation why giant over-parameterised models generalise; scaling laws
Held-out evaluation and leakage Metrics, validation and leakage benchmark contamination; eval hygiene; LLM-judge calibration
Features and representations Features and tabular data embeddings; tabular foundation models; feature stores in production
Bagging and boosting Trees and ensembles the production default for tabular data; ensembling and distillation
Kernels and similarity Kernels and SVMs attention as a learned similarity-weighted average; the neural tangent kernel
k-means, mixtures, EM Clustering and mixtures vector quantisation; inverted-file indexes for vector search
SVD and PCA Dimensionality reduction low-rank adapters (LoRA); embedding visualisation
PAC, VC and generalisation bounds Learning theory the open question of why deep networks generalise
Latent-variable models Probabilistic graphical models VAEs and diffusion models as latent-variable models

The map of this track

Classical machine learning: how the pages connect
Classical machine learning: how the pages connect. What it means to learn from data, Linear regression, Logistic regression, Bias, variance, regularisation, Metrics, validation, leakage, Features and tabular data, Trees, forests, boosting, Kernels and SVMs, Clustering, mixtures, EM, PCA, t-SNE, UMAP, Learning theory, Graphical models, sigmoid + cross-entropy, add a penalty, probabilities to score,Classical machine learning: how the pages connect. What it means to learn from data, Linear regression, Logistic regression, Bias, variance, regularisation, Metrics, validation, leakage, Features and tabular data, Trees, forests, boosting, Kernels and SVMs, Clustering, mixtures, EM, PCA, t-SNE, UMAP, Learning theory, Graphical models, sigmoid + cross-entropy, add a penalty, probabilities to score,

Box styles mark the four kinds of page: supervised models, the evaluation ideas that apply to all of them (the two gate-shaped boxes), unsupervised methods, and theory. The first unit (this page through features) is the core every later track assumes. The second unit broadens the toolbox and then deepens the theory.

How to work through this track

Times are for studying properly (deriving, running the code, answering the questions), not for reading.

  1. Core path, about 7 hours. Linear regression (75 min) → Logistic regression (75 min) → Bias, variance and regularisation (90 min) → Metrics, validation and leakage (80 min) → Features and tabular data (80 min). After this you can build, regularise, evaluate and debug a real model, and you have the concepts the deep learning track builds on.
  2. The toolbox, about 6 hours. Trees and ensembles (the tabular workhorse), Kernels and SVMs, Clustering and mixtures, Dimensionality reduction. Read trees first if you work with business data.
  3. The theory, about 4 hours. Learning theory and Probabilistic graphical models. Read these when you want to know why things generalise and before the generative models track.

If you are heading straight for LLMs: do the core path, then jump to deep learning; come back for unit 2 later. If you build products on tabular data (credit, risk, forecasting): core path plus trees and ensembles first.

Pages in this track

The five best resources for this track

For a short, opinionated overview to read first, Pedro Domingos' A Few Useful Things to Know About Machine Learning (2012) packs the folk wisdom of the field into nine pages, and Breiman's Statistical Modeling: The Two Cultures (2001) is the essay to argue with.

Before you start

This track uses, and links back to, these pages from the mathematical foundations track:

You need Python with NumPy (your workbench); every code block on this track runs in a second or two on a laptop.

Where this leads