liveBook · Manning

Mixed search space

As explained in Bayesian Optimization in Action

A mixed search space contains both continuous input dimensions and discrete choices among alternatives.

A mixed search space combines continuous input dimensions with discrete choices among alternatives. In multifidelity optimization, the query location may vary continuously while the selected fidelity—such as a low- or high-fidelity function—remains discrete. section 9.3.2

This structure changes how acquisition scores are optimized. BoTorch’s optimize_acqf_mixed handles the continuous bounds together with a fixed_features_list that enumerates allowable values for each discrete column. For example, fidelity values can be supplied as fixed alternatives while the location remains continuously optimized. section 9.3.2

Choosing a cost-effective fidelity

A multifidelity MES policy can score queries at both low and high fidelity. When low-fidelity evaluations provide more information per unit cost, the best acquisition point uses the low-fidelity option; when evidence or costs change, a high-fidelity query may become preferable. section 9.3.2

from botorch.optim.optimize import optimize_acqf_mixed
 
next_x, acq_val = optimize_acqf_mixed(
    policy,
    bounds=torch.cat(                                                #1
        [bounds, torch.tensor([0.5, 1.0]).unsqueeze(-1)], dim=1      #1
    ),                                                               #1
    fixed_features_list=[{1: cost.item()} for cost in fidelities],   #2
    q=1,
    num_restarts=20,
    raw_samples=50,
)

Inspect the BoTorch call that combines continuous bounds with enumerated discrete fidelity values. section 9.3.2

How Bayesian Optimization in Action covers it

How deep it goes
Defines the mixed structure and demonstrates its BoTorch optimizer, but defers general mixed-domain optimization details.
Examples
Uses continuous query locations paired with low- and high-fidelity function choices.
What it assumes
Assumes familiarity with continuous acquisition optimization and introduces discrete query choices through fixed feature values.
What you can do after
Apply it via BoTorch’s optimize_acqf_mixed with bounds and fixed feature values for discrete alternatives.
How it connects
Connects continuous and discrete search spaces with multifidelity optimization, acquisition functions, MES, and cost-aware utility.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Bayesian Optimization in Action. The section links point to the parts of the book it draws on.