Computer scienceData scienceInstrumentsScikit-learnMachine Learning with scikit-learn

Cross-validation in scikit-learn

The cross-validation overview

Report a typo

Match the scikit-learn cross-validation class to its usage scenario:

Match the items from left and right columns
KFold
GroupKFold
StratifiedKFold
LeaveOneOut
Used when there is a specific feature grouping, it ensures that the same group is not represented in both the train and the test set
Used when the data is imbalanced, it ensures that each fold is a good representative of the whole data set by maintaining the same ratio of each target class
Used when the dataset is extremely small
Used when the data can be evenly distributed into k groups, it is suitable for data which is not biased or imbalanced
___

Create a free account to access the full topic