Seminar · Week 6

Where this actually ships

Regularized regression is not a teaching toy replaced by deep learning in production. It runs wherever a model must be stable, auditable, cheap to serve or defensible to a regulator, which covers a lot of production machine learning.

How to read this page

Companies publish little about their live model internals, and much of what circulates online is invention. Every claim below is tagged: DOCUMENTED means a named paper or engineering publication states it; REPORTED means practitioners describe it publicly but the specific system is not published; ILLUSTRATIVE means this is how the problem is normally solved and would plausibly be solved here — a teaching reconstruction, not a claim about a particular company's code. Do not cite the illustrative rows as fact.

Maximum likelihood — the baseline that never left

Plain likelihood maximisation remains the workhorse wherever $n$ is large and the feature set is curated. With a hundred million rows and forty features, a prior has little to do.

DOCUMENTED

A/B testing, everywhere

A conversion rate is the MLE of a Bernoulli parameter, $\hat p = k/n$. Every experimentation platform computes maximum likelihood estimates and their standard errors; the $\sqrt{\hat p(1-\hat p)/n}$ in a significance calculation is an MLE's asymptotic variance.

DOCUMENTED

Click-through-rate prediction at Google

McMahan et al., Ad Click Prediction: a View from the Trenches (KDD 2013), describes logistic regression — likelihood maximisation for Bernoulli outcomes — served at ad-serving scale, trained with FTRL-Proximal. Note the addition of an $\ell_1$ penalty for sparsity, because memory per model is a hard serving constraint. That one paper covers Modules 2, 3 and 5.

MLE fails where this course begins: correlated features, $p$ approaching $n$, or a new market with little data. There, fitting the available data as tightly as possible is the wrong instruction.

Ridge — when everything matters a little

DOCUMENTEDRidge

Recommender systems

The matrix-factorization models that won the Netflix Prize minimise $\sum (r_{ui} - q_i^\top p_u)^2 + \lambda(\lVert q_i\rVert^2 + \lVert p_u\rVert^2)$ — least squares with an $\ell_2$ penalty on every latent factor, i.e. a Gaussian prior on user and item embeddings. Koren, Bell & Volinsky's 2009 IEEE Computer article states the objective explicitly. Without the penalty the model memorises users who rated 4,000 films and learns nothing about those who rated six.

REPORTEDRidge

Risk factor models in finance

Estimating a portfolio's exposure to hundreds of highly correlated macro factors is the textbook ill-conditioned problem, and shrinkage estimators — ridge and Ledoit–Wolf covariance shrinkage — are standard in the quantitative-finance literature for exactly this reason. Unregularised factor loadings swing between quarterly refits, which is unusable for a risk report someone has to sign.

DOCUMENTEDRidge

Adaptive filters: echo and noise cancellation

Regularized least squares is the core of adaptive filtering. Microphone inputs are correlated across taps, so the autocorrelation matrix is near-singular and the unregularised solution is unstable, audibly so. Adding $\delta I$ before inversion is standard practice, and is the ridge estimator.

ILLUSTRATIVERidge

Travel-time estimation

Adjacent road segments are near-duplicate features. Attributing a corridor's whole delay to one segment gives poor diagnostics and a different story after the next refit. Splitting it across the group is more stable, which is the ridge equal-split property from Theory §4.2. This is the shape of the problem, not a claim about a specific product.

Lasso — when you must name the features

DOCUMENTEDLasso

Genomics and high-dimensional biology

Twenty thousand genes, two hundred patients: the $p \gg n$ regime Lasso was built for, and the running example in Tibshirani's 1996 paper. The output that matters is the short list of genes with non-zero coefficients, which becomes the next experiment. Note the caveat from Theory §5.3: Lasso selects at most $n$ variables, and among correlated genes its choice is unstable.

DOCUMENTEDLasso

Compressed sensing and MRI

Reconstructing an image from fewer measurements than pixels is underdetermined: infinitely many images fit. An $\ell_1$ penalty on a sparse representation picks the sparsest consistent one, and works well enough that compressed-sensing MRI is cleared for clinical use. The same estimator as the surge model, in a different field.

REPORTEDLasso

Credit scoring under regulatory review

Lending regulators in many jurisdictions require specific reasons for a decline. A model with 500 bureau fields and dense weights makes that hard; 20 non-zero coefficients makes it routine. The constraint driving the choice is legal, not statistical.

DOCUMENTEDLasso

Serving-cost sparsity in ad systems

In the KDD 2013 paper, $\ell_1$ regularization is less about generalisation than about memory: a coefficient that is exactly zero need not be stored or fetched. Sparsity is an engineering property as much as a statistical one.

Elastic Net — sparse, but not brittle

DOCUMENTEDElastic Net

The example the method was invented for

Zou & Hastie's 2005 paper introduces the Elastic Net with gene-expression data. Genes operate in correlated pathways. Lasso keeps roughly one gene per pathway, chosen arbitrarily and unstable across resamples, which is misleading when the pathway is the finding. Ridge keeps all twenty thousand, which is no finding at all. Elastic Net keeps the pathway and drops the rest. The grouping bound in Theory §6.1 is from this paper.

ILLUSTRATIVEElastic Net

Ad and content ranking with sparse correlated features

Interest features arrive in clusters: "cricket", "IPL" and "Virat Kohli" are one group, not three independent signals. Pure Lasso keeps one at random, and the survivor changes between refits, which makes the model hard to explain to the team that owns it. Elastic Net is the standard answer when a correlated group must survive together.

ILLUSTRATIVEElastic Net

Multi-sensor fusion on drones and robots

IMU, barometer, vision and lidar produce correlated blocks of features. You want to drop a whole failing modality rather than one channel from each, and to keep the redundancy inside a working one, since that redundancy is the safety margin. Pure Lasso would strip exactly that. The grouping effect, stated as an engineering requirement.

MAP and full Bayes — when you must quote uncertainty

DOCUMENTED

The Kalman filter is recursive MAP

Tracking a pedestrian from noisy sensors is $p(\text{state} \mid \text{sensor}) \propto p(\text{sensor} \mid \text{state})\,p(\text{state})$, with the motion model as prior and the sensor model as likelihood. Under linear-Gaussian assumptions the posterior is Gaussian and its mode is the Kalman estimate. Autonomous vehicles and drone flight controllers run the MAP equation from Theory §3 at 100 Hz.

DOCUMENTED

Weather forecasting: data assimilation

Operational variational assimilation (3D-Var / 4D-Var) minimises $\lVert x - x_b\rVert^2_{B^{-1}} + \lVert y - H(x)\rVert^2_{R^{-1}}$ — the first term is the prior from the physics model's background state, the second the observation likelihood. That objective is MAP with a Gaussian prior, i.e. Ridge with a non-isotropic covariance. National weather services run it twice a day.

DOCUMENTED

Image denoising priors

Classical denoising minimises data fidelity plus a prior term: Tikhonov ($\ell_2$, smooth) or total variation ($\ell_1$ on the gradient, edge-preserving). TV keeps edges and Tikhonov blurs them for the corner-versus-circle reason in Theory §5.2. A photo pipeline is a regularizer choice with a visible output.

REPORTED

Quoting a number with an error bar

Any product showing a range rather than a point (a delivery window, a price estimate, a forecast band) needs predictive variance, not just a fitted value: the posterior predictive of Theory §7, and the bonus task.

The pattern underneath

Notice what decides the estimator in each case. It is almost never which has the lowest test error, since those differences are often within noise. It is a constraint from outside the model.

The real constraintForces you towardSeen above in
"A regulator must be able to read this"Lasso Credit scoring
"It must fit in memory at serving time"Lasso Ad click prediction
"It must not change its story after a refit"Ridge Risk models, ETA
"The correlated group is the finding"Elastic Net Genomics pathways
"We must show a range, not a number"Full posterior Assimilation, tracking
"We have a hundred million clean rows"MLE A/B testing
Seminar question

Pick a product you use daily and identify one number it shows that must have been estimated. Argue which of the five estimators you would use to produce it, naming the constraint rather than the accuracy that drives your choice. One paragraph, for Week 6.

The extended treatment of one system — demand forecasting, supply forecasting, the additive fare redesign and the price cap — is in the surge pricing case study.