Skip to content

Commit

Permalink
reduce number of folds for small datasets in compete mode (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
pplonski committed Dec 8, 2020
1 parent d316477 commit ac21fe8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions supervised/base_automl.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,9 @@ def _set_adjusted_validation(self):
k_folds = 5
if folds_cnt >= 15:
k_folds = 10
# too small dataset to run 10-fold CV
if k_folds == 10 and self.n_rows_in_ <= 1000:
k_folds = 5
self._validation_strategy["validation_type"] = "kfold"
del self._validation_strategy["train_ratio"]
self._validation_strategy["k_folds"] = k_folds
Expand Down

0 comments on commit ac21fe8

Please sign in to comment.