5

GridsearchCV () has an argument cv whose value by default is 3 means that it is 3fold. Is there any way to use Gridsearch() with a holdout validation scheme. For example 80-20% split???

Khan
  • 81
  • 2
  • 7

1 Answers1

3

You could use sklearn.model_selection.ShuffleSplit or sklearn.model_selection.StratifiedShuffleSplit with n_splits=1 in place of cv argument

Read the documentation for more details http://scikit-learn.org/stable/modules/generated/sklearn.model_selection.StratifiedShuffleSplit.html#sklearn.model_selection.StratifiedShuffleSplit

vumaasha
  • 2,765
  • 4
  • 27
  • 41