You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
so i have recently been working on a problem with categorical , continuous and integer variables.Therefore, i used optimize_acqf_mixed which takes as an argument the bounds related to the variables.However,if i want to use one hot encoding meaning assigning a vector of one and zeros to each category , i won't be able to fully define the bounds for the categorical variables.So basically, the only way to use this function is to assign a numerical representation to the categorical variables which introduces an order ( that doesn't truly exist) . Is there anyway around it? Also, there seems to be a problem in the link of the source code for the function.
thank you!
Hi @Mayousk. We have two optimizers for mixed search spaces.
optimize_acqf_mixed enumerates over the given fixed_features_list (which enumerates all combinations of discrete values to try) and uses optimize_acqf to optimize the remaining parameters over the continuous space. It will then return the best performing candidate. Since there is not implied ordering within fixed_features_list, it can be used for both ordinal and categorical variables.
optimize_acqf_mixed_alternating alternates between discrete and continuous optimization steps to optimize over integer valued discrete variables and continuous variables. Its discrete step uses nearest neighbor search, which assumes an ordering between the discrete values.
OneHot encoding is a technique we routinely use for categorical variables in Ax. Take parameter p1 with values ["a", "b", "c"]. This is converted to three parameters p1_oh1, p1_oh2, p1_oh3 (corresponding to "a", "b", "c"), which are continuous parameters in [0, 1]. We optimize over these three parameters and map back to the original values by picking the value corresponding to the largest _oh value.
In this setup, there is always a well defined search space (for the one-hot encoding) with bounds of [0, 1] for these parameters. Would a similar setup work for you? You could also use this directly in Ax (used by default) to optimize a function following this tutorial.
Hello,
so i have recently been working on a problem with categorical , continuous and integer variables.Therefore, i used optimize_acqf_mixed which takes as an argument the bounds related to the variables.However,if i want to use one hot encoding meaning assigning a vector of one and zeros to each category , i won't be able to fully define the bounds for the categorical variables.So basically, the only way to use this function is to assign a numerical representation to the categorical variables which introduces an order ( that doesn't truly exist) . Is there anyway around it? Also, there seems to be a problem in the link of the source code for the function.
thank you!
Originally posted by @Mayousk in #2423 (comment)
The text was updated successfully, but these errors were encountered: