Skip to content

Parameter constraints dependent on categorical variable identity? #2242

Answered by Balandat
iandoxsee asked this question in Q&A
Discussion options

You must be logged in to vote

This is a "hierarchically constrained" parameter space. This is generally not super easy to handle, and we don't have great support for this in BoTorch today. The naïve approach would be to use fixed_features and enumerate the discrete chocies: https://github.com/pytorch/botorch/blob/main/botorch/optim/optimize.py#L429

Pseudocode:

best = -float("inf")
best_X = None

for x1 in {A, B, C, D}:
    acqfval, X = optimize_acqf(
        ...,
        bounds=get_bounds(x1),
        fixed_features=get_numeric_fixed_features(x1),
        ...,
    ) 
    if acqfval > best:
        best = acqfval
        best_X = X

where get_bounds(x1) returns the respective bounds on x2 (and x1, but those doesn't mat…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@iandoxsee
Comment options

@hbai1
Comment options

@Balandat
Comment options

@hbai1
Comment options

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