From ac21fe822ed10dc565f829eb0b7b388861b812dc Mon Sep 17 00:00:00 2001 From: Piotrek Date: Tue, 8 Dec 2020 12:04:06 +0100 Subject: [PATCH] reduce number of folds for small datasets in compete mode (#266) --- supervised/base_automl.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/supervised/base_automl.py b/supervised/base_automl.py index 98e07cf2..1a0f0191 100644 --- a/supervised/base_automl.py +++ b/supervised/base_automl.py @@ -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