GroupKFold
- class sklearn.model_selection.GroupKFold(n_splits=5, *, shuffle=False, random_state=None)
K-fold iterator variant with non-overlapping groups.
Each group will appear exactly once in the test set across all folds (the number of distinct groups has to be at least equal to the number of folds).
The folds are approximately balanced in the sense that the number of samples is approximately the same in each test fold when
is True.