emukit.quadrature.acquisitions package
Module contents
Acquisition functions for the quadrature package.
- class emukit.quadrature.acquisitions.MutualInformation(model)
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.
- property has_gradients: bool
Whether acquisition value has analytical gradient calculation available.
- 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_with_gradients(x)
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)
- emukit.quadrature.acquisitions.IntegralVarianceReduction
alias of
SquaredCorrelation
- class emukit.quadrature.acquisitions.SquaredCorrelation(model)
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.
- property has_gradients: bool
Whether acquisition value has analytical gradient calculation available.
- 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_with_gradients(x)
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)
- class emukit.quadrature.acquisitions.UncertaintySampling(model, measure_power=2)
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:
model (
Union
[WarpedBayesianQuadratureModel
,IDifferentiable
]) – A warped Bayesian quadrature model that has gradients.measure_power (
float
) – The power \(q\) of the measure. Default is 2.
- property has_gradients: bool
Whether acquisition value has analytical gradient calculation available.
- 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_with_gradients(x)
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)