model_selection.KFold()

sklearn.model_selection.KFold

class sklearn.model_selection.KFold(n_splits=3, shuffle=False, random_state=None) [source]

K-Folds cross-validator

Provides train/test indices to split data in train/test sets. Split dataset into k consecutive folds (without shuffling by default).

Each fold is then used once as a validation while the k - 1 remaining folds form the training set.

Read more in the User Guide.

登录查看完整内容