Because the columns of the design matrix are centred, ridge regression with an unpenalized intercept solves
The normal equations give, for ,
The fitted values are consequently
If 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, update
For coordinate , form the partial residual
and update it by the exact one-dimensional minimizer
Repeated 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 error
and 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 therefore
respectively.
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 gives
Expanding 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 (0)

There are currently no matching articles.