# Is this a proper way to perform cross validation?

I saw a presentation by a student in my department, where he's demonstrating k-fold cross validation using OLS.

He split the dataset $$\mathcal{D}$$ into k partitions as usual, and trained k OLS models on $$\mathcal{D}\setminus \mathcal{D_k}$$ and assessed the k-th model on the $$\mathcal{D_k}$$. So all of this so far is aligned with my understanding.

But then he made the statement that the model with the lowest prediction error is the chosen model, but he didn't train the "chosen" model on the entire $$\mathcal{D}$$ after performing k-fold CV.

Is this procedure wrong? I thought you're supposed to train the chosen model on the entire dataset after performing cross validation?

• I have not yet understood the second part. Could you outline the process with an example as simple as possible? Jun 29, 2020 at 19:34
• @MichaelM Unfortunately, I don't have his presentation slides, so everything I'm stating is from my memory of the presentation. When I read my question and think about what he did, I feel like it doesn't make sense. He basically suggested that he found $k$ sets of $\hat{\beta}$ OLS parameters. For future modeling purposes, he chose the $\hat{\beta}$ that gave the smallest prediction error observed during the k-fold validation. Jun 29, 2020 at 19:41
• This approach is flawed. K-Fold CV is not for model selection, it is for model evaluation. The results can be used to select between multiple models that you evaluated individually, but for a given model, the various folds are just used for evaluating the models out of sample performance. The estimated parameters and metrics of each fold are not used for anything Jun 29, 2020 at 19:53
• That sounds very wrong then! Jun 29, 2020 at 19:54
• @user5965026 You are correct and I believe I worded that poorly. K-Fold CV can be applied to estimate the performance of multiple models, or the same model with different hyperparameters, and that data can be used for model selection. The distinction I wanted to make is that K-Fold CV itself is not a model selection algorithm or procedure like grid search. Jun 29, 2020 at 20:15

• Would you ever use CV for plain OLS? I think in a way, you can view the number of explanatory variables / features in OLS as hyperparameters, and use CV for feature selection of a subset of the original features? When you say "increases the variance," what are you saying increases in variance? There seems to be some confusion on this based on other posts on k-Fold Validation that I've read. But those seem to be focused on variance increasing in the prediction error as $k$ increases. Jun 29, 2020 at 20:02
• "The procedure that the student employs is actually choosing a dataset." Hmm this seems to be exactly what he did under the hood. He found a training dataset and testing dataset that gave a $\hat{\beta}$ that achieves the best prediction error. That doesn't seem to serve as practical use. Jun 29, 2020 at 20:04