Because the columns of the design matrix are centred, ridge regression with an unpenalized intercept solvesThe normal equations give, for ,The fitted values are consequentlyIf the objective is normalized by , the same formulas hold after replacing by .
Choose to minimize an estimate of out-of-sample mean squared prediction error, commonly K-fold cross-validation or a separate validation set. As increases, the coefficient vector is shrunk toward zero. This generally increases bias of an estimator but decreases variance of an estimator; the minimizing value balances the two contributions in the bias-variance tradeoff. The independent test set in the question can assess the final choice, but repeatedly selecting on that same set would cause data leakage.
Coordinate descent cycles through the intercept and coefficient coordinates, minimizing the convex ridge objective in one coordinate while holding the others fixed. Given current coefficients, updateFor coordinate , form the partial residualand update it by the exact one-dimensional minimizerRepeated sweeps converge to the unique fitted value because the objective is a convex function; with it is strictly convex in .
The solid curve is the test errorand the dashed curve is the training error . As the horizontal coordinate tends to , , so every penalized slope tends to zero and . The two limits are thereforerespectively.
As the horizontal coordinate tends to , and the fit approaches the ordinary least squares fit . Hence the solid curve tends to , which the plot shows is approximately .
Put , so and with independent noise vectors having covariance matrix . For any deterministic linear smoother ,whereas independence givesExpanding the first trace shows that the second expression exceeds the first by , proving the identity.
For ridge regression,Its effective degrees of freedom are . Thus training error is optimistically biased for independent-copy prediction error by . The graph exhibits exactly this effect: the dashed training curve keeps falling as decreases, while the solid test curve eventually rises through overfitting.
Articles by others on the same topic
There are currently no matching articles.