Pergunta

Here is the explain of cv parameter in the sklearn.model_selection.GridSearchCV:

cv : int, cross-validation generator or an iterable, optional

Determines the cross-validation splitting strategy. Possible inputs for cv are:

  • integer, to specify the number of folds in a (Stratified)KFold

For example, can I replace

CV = 5

to

CV = KFold(n_splits=5, random_state=None, shuffle=False)

or replace in the opposite way. CV is called in the function

GridSearchCV(estimator=XXX, ... , cv = CV)

I am not sure whether any difference?

Nenhuma solução correta

Licenciado em: CC-BY-SA com atribuição
scroll top