I would like to know the purpose of the 2 functions GridSearchCV and KFold. I know that GridSearchCV performs a grid search over a set of mentioned hyperparameters for a model(lets say an SVC), and validates the model formed using CV.
KFold on the other hand just splits the data into k parts and we can use that to evaluate a model where we have already fixed the hyperparameters?
I have seen some code where both function are used together, I assumed before that using just GridSearchCV also gives you the CV error?
So do you train the model first for which you use KFold method and then use GridSearchCV in order to tune the hyperparameters of the model trained? Which is the best way to reduce the bias and variance?
Im am extremely confused any help is appreciated!
Thank you!