diff --git a/mlforecast/auto.py b/mlforecast/auto.py index 96e30b61..74f3929c 100644 --- a/mlforecast/auto.py +++ b/mlforecast/auto.py @@ -102,7 +102,7 @@ def random_forest_space(trial: optuna.Trial): return { "n_estimators": trial.suggest_int("n_estimators", 50, 1000), "max_depth": trial.suggest_int("max_depth", 1, 10), - "min_samples_split": trial.suggest_int("min_child_samples", 1, 100), + "min_samples_split": trial.suggest_int("min_samples_split", 2, 100), "max_features": trial.suggest_float("max_features", 0.5, 1.0), "criterion": trial.suggest_categorical( "criterion", ["squared_error", "absolute_error"] diff --git a/nbs/auto.ipynb b/nbs/auto.ipynb index dcda602e..2d9073f9 100644 --- a/nbs/auto.ipynb +++ b/nbs/auto.ipynb @@ -134,7 +134,7 @@ " return {\n", " 'n_estimators': trial.suggest_int('n_estimators', 50, 1000),\n", " 'max_depth': trial.suggest_int('max_depth', 1, 10),\n", - " 'min_samples_split': trial.suggest_int('min_child_samples', 1, 100),\n", + " 'min_samples_split': trial.suggest_int('min_samples_split', 2, 100),\n", " 'max_features': trial.suggest_float('max_features', 0.5, 1.0),\n", " 'criterion': trial.suggest_categorical('criterion', ['squared_error', 'absolute_error']),\n", " }\n",