Skip to content

Commit

Permalink
[fix] Fix a contradiction in holdout_stratified_validation
Browse files Browse the repository at this point in the history
Since stratified splitting requires to shuffle by default
and it raises error in the github check,
I fixed this issue.
  • Loading branch information
nabenabe0928 committed Apr 8, 2021
1 parent f479ace commit 81e4de8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoPyTorch/datasets/resampling_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def stratified_holdout_validation(val_share: float,
indices: np.ndarray,
**kwargs: Any
) -> Tuple[np.ndarray, np.ndarray]:
train, val = train_test_split(indices, test_size=val_share, shuffle=False, stratify=kwargs["stratify"])
train, val = train_test_split(indices, test_size=val_share, shuffle=True, stratify=kwargs["stratify"])
return train, val

@classmethod
Expand Down

0 comments on commit 81e4de8

Please sign in to comment.