boax.acquisitions.q_expected_improvement

boax.acquisitions.q_expected_improvement#

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

MC-based batch Expected Improvement acquisition function.

This computes qEI by (1) sampling the joint posterior over q points (2) evaluating the improvement over the current best for each sample (3) maximizing over q (4) averaging over the samples.

qEI(x) = E(max(max y - best, 0)), y ~ f(x), x = (x_1,…,x_q)

Example

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

  • model – The surrogate model.

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

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

Return type:

Acquisition

Returns:

The corresponding Acquisition.