Skip to content

Utility Maximizer


AbstractUtilityMaximizer = AbstractSinglePointUtilityMaximizer module-attribute

Type alias for a utility maximizer. Currently we only support single point utility functions, but in future may support batched utility functions.

AbstractSinglePointUtilityMaximizer dataclass

Bases: ABC

Abstract base class for single point utility function maximizers.

__init__() -> None
maximize(utility_function: SinglePointUtilityFunction, search_space: AbstractSearchSpace, key: KeyArray) -> Float[Array, '1 D'] abstractmethod

Maximize the given utility function over the search space provided.


Name Type Description Default
utility_function UtilityFunction

Utility function to be

search_space AbstractSearchSpace

Search space over which to maximize

key KeyArray




Type Description
Float[Array, '1 D']

Float[Array, "1 D"]: Point at which the utility function is maximized.

ContinuousSinglePointUtilityMaximizer dataclass

Bases: AbstractSinglePointUtilityMaximizer

The ContinuousUtilityMaximizer class is used to maximize utility functions over the continuous domain with L-BFGS-B. First we sample the utility function at num_initial_samples points from the search space, and then we run L-BFGS-B from the best of these initial points. We run this process num_restarts number of times, each time sampling a different random set of num_initial_samplesinitial points.

num_initial_samples: int instance-attribute
num_restarts: int instance-attribute
__init__(num_initial_samples: int, num_restarts: int) -> None
maximize(utility_function: SinglePointUtilityFunction, search_space: ContinuousSearchSpace, key: KeyArray) -> Float[Array, '1 D']