## Module contents¶

Acquisition functions for the quadrature package.

Bases: Acquisition

The mutual information between the integral value and integrand evaluations under a Gaussian process model.

The mutual information is a monotonic transformation of the squared correlation, hence it yields the same acquisition policy under a standard Gaussian process model.

$a(x) = -0.5 \log(1-\rho^2(x))$

where $$\rho^2$$ is the squared correlation.

Parameters

model (VanillaBayesianQuadrature) – A vanilla Bayesian quadrature model.

Whether acquisition value has analytical gradient calculation available.

Return type

bool

evaluate(x)

Evaluates the acquisition function at x.

Parameters

x (ndarray) – The locations where to evaluate, shape (n_points, input_dim) .

Return type

ndarray

Returns

The acquisition values at x, shape (n_points, 1).

Evaluate the acquisition function and its gradient.

Parameters

x (ndarray) – The locations where to evaluate, shape (n_points, input_dim) .

Return type

Tuple[ndarray, ndarray]

Returns

The acquisition values and corresponding gradients at x, shapes (n_points, 1) and (n_points, input_dim)

alias of SquaredCorrelation

Bases: Acquisition

The squared correlation between the integral value and integrand evaluations under a Gaussian process model.

$a(x) = \frac{(\int k_N(s, x)p(s)\mathrm{d}s)^2}{\mathfrak{v}_N v_N(x)}\in [0, 1]$

where $$\mathfrak{v}_N$$ is the current integral variance given $$N$$ observations, $$v_N(x)$$ is the predictive integral variance if point $$x$$ was added newly, and $$k_N(s, x)$$ is the posterior kernel function.

Note

The squared correlation is identical to the integral-variance-reduction acquisition up to a global normalizing constant under a standard Gaussian process model.

Parameters

model (VanillaBayesianQuadrature) – A vanilla Bayesian quadrature model.

Whether acquisition value has analytical gradient calculation available.

Return type

bool

evaluate(x)

Evaluates the acquisition function at x.

Parameters

x (ndarray) – The locations where to evaluate, shape (n_points, input_dim) .

Return type

ndarray

Returns

The acquisition values at x, shape (n_points, 1).

Evaluate the acquisition function and its gradient.

Parameters

x (ndarray) – The locations where to evaluate, shape (n_points, input_dim).

Return type

Tuple[ndarray, ndarray]

Returns

The acquisition values and corresponding gradients at x, shapes (n_points, 1) and (n_points, input_dim)

Bases: Acquisition

Uncertainty sampling.

$a(x) = \operatorname{var}(f(x)) p(x)^q$

where $$p(x)$$ is the density of the integration measure, $$\operatorname{var}(f(x))$$ is the predictive variance of the model at $$x$$ and $$q$$ is the measure_power parameter.

Parameters

Whether acquisition value has analytical gradient calculation available.

Return type

bool

evaluate(x)

Evaluates the acquisition function at x.

Parameters

x (ndarray) – The locations where to evaluate, shape (n_points, input_dim) .

Return type

ndarray

Returns

The acquisition values at x, shape (n_points, 1).

Evaluate the acquisition function and its gradient.

Parameters

x (ndarray) – The locations where to evaluate, shape (n_points, input_dim).

Return type

Tuple[ndarray, ndarray]

Returns

The acquisition values and corresponding gradients at x, shapes (n_points, 1) and (n_points, input_dim)