Suppose we have a training dataset of 90 points, and a test set of 30 points, and want to know which $\lambda$ value is best for a ridge regression model. Our candidate hyperparameters are $\lambda=0.1, \lambda=1$, and $\lambda=10$.
Suppose we select the best choice of $\lambda$ from the three choices available using 3-fold cross validation. As mentioned in class, we can compute the optimal parameters for a ridge regression model with the expression $\vec{\beta}=\left(\mathbb{X}^T \mathbb{X}+n \lambda I\right)^{-1} \mathbb{X}^T \vec{y}$. Assume that we use this closed equation to fit the parameters for our model.
$(I)$ During the entire process of selecting our best $\lambda$, how many total times will we evaluate the expression $\left(\mathbb{X}^T \mathbb{X}+n \lambda I\right)^{-1} \mathbb{X}^T \vec{y}$ ?
$(II)$ How many rows will be in X each time this expression is evaluated?
Which of the following is correct for $(I)$ and $(II)$ respectively ?
A. $9 , 60$
B. $6, 50$
C. $6, 60$
D. $9, 6$