Skip to content

Commit

Permalink
bug fix in hyperopt-fmin
Browse files Browse the repository at this point in the history
  • Loading branch information
ronylpatil committed Mar 23, 2024
1 parent 03d66b1 commit 940e708
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/models/tune_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ def main() -> None :
'max_depth': hp.choice('max_depth', np.arange(4, 12, dtype = int)),
'min_samples_split': hp.choice('min_samples_split', np.arange(15, 50, dtype = int)),
'min_samples_leaf': hp.choice('min_samples_leaf', np.arange(15, 100, dtype = int)) }
try :
try :
# hp.choice return index not the actual value of parameter
# to convert indices into value use return_argmin = False
# or use space_eval(search_space, best_result)
best_result = fmin(fn = partial_obj,
space = search_space,
algo = tpe.suggest,
Expand Down

0 comments on commit 940e708

Please sign in to comment.