how to optimize discrete inputs #1097
-
Thank you for a lot of helpful library for Bayesian Optimization.
I give Like this, When I'd like discrete inputs(>=2 this case x2, x3) candidate, how should I use it? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
So doing If you want to optimize the continuous features and fix the discrete ones, you should be doing sth like |
Beta Was this translation helpful? Give feedback.
-
Last one. Thank you a lot! I'd like to use this optim_acqf below,
Only int(discrete) features, no continuous feature.
I'm sorry my poor English and |
Beta Was this translation helpful? Give feedback.
So doing
fixed_features_list = [{3: 1}, {3: 2}, {2: 1}, {2: 2}]
will loop over the four dicts in the list, perform optimization with the features as specified in the respective dict fixed, and then pick the best value across all four dicts.If you want to optimize the continuous features and fix the discrete ones, you should be doing sth like
fixed_features_list = [{2: 1, 3: 1}]
, which will rune one optimization with features 2 and 3 both fixed to 1. If you want multiple combinations of fixed features you can add additional dicts to the list.