Predictors that say the same thing
When two regressors move almost together, such as a stock's momentum over 6 and over 12 months, the regression cannot tell which one deserves the credit. This is multicollinearity. The fit can stay good, but the individual coefficients become unstable: a small change in the data can swing one up and the other down, and their standard errors blow up. The variance inflation factor of regressor is , where comes from regressing that regressor on all the others. A VIF above 5 or 10 is a warning.
Regularisation fixes the instability by adding a penalty on the size of the coefficients. Ridge (L2) adds : the solution is the ordinary one with added to , which makes the matrix well conditioned (tie this to the linear algebra skill) and shrinks every coefficient towards zero. Lasso (L1) adds and can set some coefficients exactly to zero, selecting predictors. Both trade a little bias for a large drop in variance, and is chosen by cross-validation, the next topic.
- Multicollinearity: unstable coefficients and inflated standard errors, predictions often still fine.
- Ridge: shrinks all coefficients, never exactly to zero. Lasso: can set coefficients to exactly zero.
- Choose the penalty by cross-validation, never by looking at the training fit.
With two near-duplicate factors, each coefficient alone is not interpretable: a large positive and a large negative one can cancel to give a sensible sum. Judge the pair together, drop or combine one of them, or regularise. Predictions from the model can still be good, because the combination is well determined even when each part is not.
Lab · what's graded
7 tasks · 100 pts- A variance inflation factor15 pts
- From VIF back to R squared10 pts
- The ridge matrix15 pts
- A shrunken coefficient15 pts
- Which penalty selects variables15 pts
- What collinearity does15 pts
- Why ridge helps15 pts