0
$\begingroup$

I am kind of confused about when it is appropriate to use refit in machine learning method, say if I train a model and select the optimal hyperparameters with 5-fold cv. The highest cv score will tell which set of hyperparameters the model will use. Then, one can use the model on test dataset to check over-fitting.

However, from my point of view, I do believe one should retrain the model after cross-validation because a 5-fold cv determines one set of hyperparameter but within each fold you have a model with the same hyperparameter but different parameters. This means you have 5 different models in 5-fold cv. Then what does it mean to use 5 models to predict on the test data?

My understanding is that every time one should always use the hyperparameter to refit model on the entire training data, then predict on test data. But I don't see a lot of people use refit method, so why was that?

$\endgroup$
2