Skip to content

Commit

Permalink
fix min_samples_split in random forest space (#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoralez authored Jul 17, 2024
1 parent 91c2a59 commit 1c08dc3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mlforecast/auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion nbs/auto.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 1c08dc3

Please sign in to comment.