kwcoco.util.util_sklearn module¶
Extensions to sklearn constructs
-
class
kwcoco.util.util_sklearn.
StratifiedGroupKFold
(n_splits=3, shuffle=False, random_state=None)[source]¶ Bases:
sklearn.model_selection._split._BaseKFold
Stratified K-Folds cross-validator with Grouping
Provides train/test indices to split data in train/test sets.
This cross-validation object is a variation of GroupKFold that returns stratified folds. The folds are made by preserving the percentage of samples for each class.
Read more in the User Guide.
Parameters: n_splits (int, default=3) – Number of folds. Must be at least 2.