-2

I am using GridSearchCV from the sk.learn library at the moment. When you call the predict method of GridSearchCV it always predicts on the test set with the best scoring estimator in the training set.

However there are such problems as overfitting and I would like to call the predict method with more models - for example best of three.

Is there a way to do this? From the documentation it seems not.

DerBenutzer
  • 311
  • 1
  • 5
  • 20

1 Answers1

0

The intention of a grid search is usually to get the best hyperparameter in a model. I would suggest a for loop that iterates over different models and scores the overall best accuracy of each in a list. The output you would get the model (with the best hyperparameter ) and you could compare the different models.

Andres Ordorica
  • 302
  • 1
  • 5