liveBook · Manning

Optimize_acqf_mixed

As explained in Bayesian Optimization in Action

optimize_acqf_mixed is a BoTorch function that optimizes an acquisition function over search spaces combining continuous variables with fixed discrete alternatives.

When an optimization query combines a continuous location with a discrete choice—such as selecting a fidelity level—ordinary optimize_acqf is insufficient. BoTorch's optimize_acqf_mixed searches this mixed space for the candidate with the highest acquisition score. section 9.3.2 section 9.7

The continuous variables remain bounded normally, while fixed_features_list enumerates allowed values for each discrete column. Include bounds for the discrete dimensions in bounds as well. section 9.3.2

Selecting a multifidelity query

A multifidelity MES policy can optimize one continuous location and two possible fidelity values as follows:\n\nfrom botorch.optim.optimize import optimize_acqf_mixed\n\nnext_x, acq_val = optimize_acqf_mixed(\n policy,\n bounds=torch.cat([bounds, torch.tensor([0.5, 1.0]).unsqueeze(-1)], dim=1),\n fixed_features_list=[{1: cost.item()} for cost in fidelities],\n q=1,\n num_restarts=20,\n raw_samples=50,\n)\n\nThe resulting candidate can favor a low-fidelity query when its acquisition score reflects greater information per unit cost. section 9.3.2

How Bayesian Optimization in Action covers it

How deep it goes
Explains the helper's arguments and shows a multifidelity call, but does not detail its internal search algorithm.
Examples
Uses a multifidelity MES policy that chooses between low- and high-fidelity queries over a continuous location.
What it assumes
Assumes an acquisition policy, search-space bounds, and discrete feature values are already defined.
What you can do after
Apply it via BoTorch to generate acquisition-maximizing candidates in mixed continuous-discrete search spaces.
How it connects
Connects acquisition functions with multifidelity optimization, MES, cost-aware utility, and fixed-feature acquisition functions.

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.