Skip to content

how to optimize discrete inputs #1097

Answered by Balandat
taikichi-pc asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@taikichi-pc
Comment options

@Balandat
Comment options

@taikichi-pc
Comment options

Answer selected by taikichi-pc
Comment options

You must be logged in to vote
1 reply
@Balandat
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants