We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93e6862 commit bef4323Copy full SHA for bef4323
autoPyTorch/datasets/resampling_strategy.py
@@ -32,9 +32,11 @@ def holdout_validation(
32
labels_to_stratify: Optional[Union[Tuple[np.ndarray, np.ndarray], Dataset]] = None
33
) -> List[Tuple[np.ndarray, np.ndarray]]:
34
35
+ """ SKLearn requires shuffle=True for stratify """
36
train, val = train_test_split(
37
indices, test_size=val_share,
- shuffle=shuffle, random_state=random_state,
38
+ shuffle=shuffle if labels_to_stratify is None else True,
39
+ random_state=random_state,
40
stratify=labels_to_stratify
41
)
42
return [(train, val)]
0 commit comments