WeightedPredictiveVariance

class probnum.quad.solvers.acquisition_functions.WeightedPredictiveVariance

Bases: AcquisitionFunction

The predictive variance acquisition function that yields uncertainty sampling.

The acquisition function is

\[a(x) = \operatorname{Var}(f(x)) p(x)^2\]

where \(\operatorname{Var}(f(x))\) is the predictive variance of the model and \(p(x)\) is the density of the integration measure \(\mu\).

Notes

The implementation scales \(a(x)\) with the inverse of the squared kernel scale for numerical stability.

Attributes Summary

has_gradients

Whether the acquisition function exposes gradients.

Methods Summary

__call__(x, bq_state)

Evaluates the acquisition function and optionally its gradients.

Attributes Documentation

has_gradients

Methods Documentation

__call__(x, bq_state)[source]

Evaluates the acquisition function and optionally its gradients.

Parameters:
  • x (ndarray) – shape=(batch_size, input_dim) – The nodes where the acquisition function is being evaluated.

  • bq_state (BQState) – State of the BQ belief.

Returns:

  • acquisition_valuesshape=(batch_size, ) – The acquisition values at nodes x.

  • acquisition_gradientsshape=(batch_size, input_dim) – The corresponding gradients (optional).

Return type:

Tuple[ndarray, ndarray | None]