Skip to content

Commit 7318999

Browse files
authored
More explicit subsample bounds check (#1545)
The subsample float can be further validated via 0<=subsample<1 (not only the upper bound)
1 parent af9d469 commit 7318999

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autosklearn/evaluation/train_evaluator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def subsample_indices(
8181
elif subsample > 1:
8282
raise ValueError("Subsample must not be larger than 1, but is %f" % subsample)
8383

84-
if subsample is not None and subsample < 1:
84+
if subsample is not None and 0 <= subsample < 1:
8585
# Only subsample if there are more indices given to this method than
8686
# required to subsample because otherwise scikit-learn will complain
8787

0 commit comments

Comments
 (0)