Skip to content

Commit 81e4de8

Browse files
committed
[fix] Fix a contradiction in holdout_stratified_validation
Since stratified splitting requires to shuffle by default and it raises error in the github check, I fixed this issue.
1 parent f479ace commit 81e4de8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoPyTorch/datasets/resampling_strategy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def stratified_holdout_validation(val_share: float,
113113
indices: np.ndarray,
114114
**kwargs: Any
115115
) -> Tuple[np.ndarray, np.ndarray]:
116-
train, val = train_test_split(indices, test_size=val_share, shuffle=False, stratify=kwargs["stratify"])
116+
train, val = train_test_split(indices, test_size=val_share, shuffle=True, stratify=kwargs["stratify"])
117117
return train, val
118118

119119
@classmethod

0 commit comments

Comments
 (0)