In a machine learning procedure, suppose we've chosen k=10 for the "K-Fold Cross Validation". After we do the k steps of "K-Fold Cross Validation", how do we choose the final model for the classifier ? (The one will we use in order to predict new data)
1 Answer
K-fold cross validation only helps you giving an estimation of the error you are going to make with a given model. K-fold can be used in order to tune hyperparameters: we have a model that depends on some hyperparameters, we compute the K-fold validation error using different values of the hyperparameters, and we take the model with the lowest cross-validation error. Finally, we train the model with the chosen hyperparameters with all the training data and we build a classifier based on that model.