TL;DR
When you have many candidate predictors, a regression that uses all of them fits the training data best but predicts new data poorly. Mallows' is a score for a smaller model. It is the model's residual error, scaled, plus a penalty of two for each parameter. If a model leaves out nothing important, its comes out close to its number of parameters . A well above signals that the model is missing something real.
The examples use made-up numbers to show the arithmetic.
Where you'll see it: choosing which predictors to keep in a regression, reading the output of stepwise selection, and as the least-squares cousin of AIC.
Intuition
A ruler for fit and complexity
Suppose you are fitting a line to 20 points, and you could use one, two, or five predictors. More predictors always lower the residual sum of squares (RSS), the total squared gap between the data and the fit. Adding a predictor cannot make the training fit worse. So the RSS alone always says to add everything, and that is the trap that Overfitting sets.
The fix is to charge for complexity. does this in a specific way: it divides the RSS by the noise variance, subtracts the number of observations (the value that cancels the RSS of a model with no bias, as the derivation below shows), and adds twice the number of parameters. The result is an estimate of how far the model's fitted values stray from the truth, in units of noise. A model that is too simple leaves out signal, so its RSS is too large. A model that is too complex has more parameters, and the term pushes its score up.
The picture below shows the idea with illustrative curves. A submodel with no bias has equal to . A submodel that leaves out a real effect has an extra term that is large when the model is small and shrinks as it grows.
- no bias: C_p = p
- bias term 4/p
Two more pieces of language help. The bias is the systematic part of the error that no choice of coefficients within the model can remove. The variance is the noise that comes from estimating coefficients from a finite sample. Adding predictors usually reduces bias and increases variance. is a way to find the point where the two balance, in the terms set out in the Bias-Variance Tradeoff.
The math
Fit a least-squares model with parameters (including the intercept) to observations. Let be its residual sum of squares. Let be the estimate of the noise variance taken from the largest candidate model, which is assumed to be nearly unbiased. Mallows' is
Here is the residual variance of the full model with parameters, .
Where the formula comes from
Write the true mean response as and the noise as independent with variance . Let be the projection (hat) matrix that maps to the submodel's fitted values, projecting onto the span of its columns. A projection onto a -dimensional space has trace , and has trace . The residual vector is , and its expected squared length is
where is the squared bias in the submodel. Divide by and take expectations of , using :
So is near when the bias is zero, and it exceeds by the scaled bias otherwise. The same algebra shows that , which is why is described as an estimate of the scaled error in the fitted values.
Two facts that follow
- For the full model, exactly, so by construction. Every candidate can be compared with the full model's .
- is minimised over subsets by searching many models. This is why Forward Stepwise Selection and similar searches use as a stopping rule, and why Model Selection treats it as a penalised score.
Worked examples
These numbers are made up for illustration.
- The full model has 5 predictors plus an intercept, so and .
- Its residual sum of squares is , so .
- Take a submodel with (intercept plus two predictors) and .
- Scaled RSS: .
- .
Interpretation: is a little above , so the bias is small, about in scaled units. The submodel is close to adequate.
Continue with the same data. Here are three submodels with their RSS values, all fitted to the same 20 observations:
| Model | RSS | Scaled RSS | ||
|---|---|---|---|---|
| Intercept and one predictor | 2 | 75 | 26.25 | 10.25 |
| Intercept and two predictors | 3 | 52 | 18.2 | 4.2 |
| Intercept, three predictors | 4 | 45 | 15.75 | 3.75 |
- The model with has , far above 2. It leaves out a real effect.
- The model with has , about above its size.
- The model with has , below its size. A value a little below is normal when noise pulls the RSS down by chance.
- Pick a small model whose is close to . Here has the lowest and sits just under its size, so it is the choice.
Interpretation: adding the third predictor lowers the RSS by 7 and so lowers the score. The score is what tells us whether that drop is worth its parameter. Here it is.
Tradeoffs and failure modes
is simple, fast and tied to least squares. Its weaknesses come from the assumptions behind it.
| Situation | Problem | Better choice |
|---|---|---|
| The noise variance is estimated from a poor full model | is biased, so every is off | Estimate from a model you trust to have little bias, or use cross-validation |
| Many subsets are searched | The minimum is optimistic, and the chosen model overfits | Validate the choice on held-out data |
| The model is not linear least squares | The formula does not apply | Use AIC or cross-validation |
| The goal is prediction on new inputs, not fitted values | targets fitted values at the observed inputs | Use Model Selection with held-out error |
| Predictors are highly correlated | Subsets change a lot with small data changes, and the path is unstable | Regularise, for example with a ridge penalty |
The penalty is a choice. Other penalties, such as the one in BIC, give different answers and favour smaller models. is in the same family as AIC: for least squares with known variance, the two rank models identically, which is why is often called the regression-specific cousin of AIC.
History
Colin Mallows introduced in the early 1970s as a practical way to choose subsets of regression variables from the residual sums of squares of candidate subsets. The problem it solved was concrete. Statisticians could already compute RSS for many subsets, but needed a rule that did not simply reward adding variables.
Akaike's information criterion, proposed at about the same time, rests on the same idea of an adjusted fit. stayed popular in applied regression because it is easy to read off a regression printout and has a clear meaning: its value near indicates an adequate model.
Modern texts such as James, Witten, Hastie and Tibshirani's An Introduction to Statistical Learning present alongside AIC and BIC, and use cross-validation for the same job, because cross-validation makes fewer assumptions.