I am a newbie in ML, and I have a question about training the model with cross-validation similar to this one
In this problem, it was suggested to find the hyperparameters with GridSearchCV
with 80% of the data, and then train the model with the same 80%.
In my case, I am using hyperoptimization
library to find the hyperparameters with 80% of the data, and then I train the model with cross-validation KFold
. Finally, I test the data.
Is this sequence correct?
If so, for each iteration during the cross-validation, I obtain the error of the model (R-Squared), and then I display an average of the errors. Is this correct, or I just should calculate the R-Squared with the test set?
GridSearchCV
andKFold
are from Scikit-learn. $\endgroup$