boax.acquisitions.q_probability_of_improvement

boax.acquisitions.q_probability_of_improvement#

boax.acquisitions.q_probability_of_improvement(bounds, batch_size, sampler, sample_axis=(0,), improvement_factor=1.0, tau=1.0, num_raw_samples=512, num_restarts=10)#

MC-based batch Probability of Improvement acquisition function.

Estimates the probability of improvement over the current best observed value by sampling from the joint posterior distribution of the q-batch. MC-based estimates of a probability involves taking expectation of an indicator function; to support auto-differentiation, the indicator is replaced with a sigmoid function with temperature parameter tau.

qPI(x) = P(max y >= best), y ~ f(x), x = (x_1,…,x_q)

Example

>>> acqf = q_probability_of_improvement(1.0, model, sampler)
>>> qpoi = acqf(index_points)
Parameters:
  • best – The best function value observed so far.

  • model – The surrogate model.

  • sampler (Sampler[TypeVar(T)]) – The posterior sampler.

  • tau (Union[Array, ndarray, bool, number, float, int]) – The temperature parameter.

  • sample_axis (Sequence[Union[int, Any]]) – The sample axis.

Return type:

Acquisition[TypeVar(T)]

Returns:

The corresponding Acquisition.