Search code examples
machine-learningscikit-learngrid-search

Fitting into GridSearchCV


What X,y I should fit into GridSearchCV? That I have used to train model or to test model? As I found out that using wrong one, resulted in bad accuracy score for the model ;C


Solution

  • Always perform GridSearchCV on your train set, thus X_train and y_train.