Ex. 18.12
Ex. 18.12
Suppose we wish to select the ridge parameter by 10-fold cross-validation in a situation (for any linear model). We wish to use the computational shortcuts described in Section 18.3.5. Show that we need only to reduce the matrix to the matrix once, and can use it in all the cross-validation runs.
Soln. 18.12
The matrix is constructed via SVD of in (18.13). For each observation , (18.13) defines a corresponding .
To perform 10-fold cross-validation, we divide the training sample into 10 subsets with size . Correspondingly, we divide the matrix into 10 subsets with the same division indices as . We separate each subset aside and train on the remaining subsets. Recall the theorem described in (18.16)-(18.17) in the text, each training session (indexed by ) essential becomes solving
which has the same optimal solution if we solve for for like (18.17). Therefore, we only need to construct once.