Bases: object
Estimate an integral of the following form using Bayesian Quadrature with a Gaussian Process prior:
See load_options for details on allowable options.
Parameters : | x : numpy.ndarray
l : numpy.ndarray
options : dict
|
---|
Notes
This algorithm is an updated version of the one described in [OD12]. The overall idea is:
Computes the mean of \(Z\), which is defined as:
Returns : | mean : float |
---|
Computes the variance of \(Z\), which is defined as:
Returns : | var : float |
---|
Computes the expected variance of \(Z\) given a new observation \(x_a\). This is defined as:
Parameters : | x_a : numpy.ndarray
|
---|---|
Returns : | out : expected variance for each point in x_a |
Computes the expected mean of \(Z\) given a new observation \(x_a\).
Parameters : | x_a : numpy.ndarray
|
---|---|
Returns : | out : expected mean for each point in x_a |
Computes the expected square mean of \(Z\) given a new observation \(x_a\). This is defined as:
Parameters : | x_a : numpy.ndarray
|
---|---|
Returns : | out : expected squared mean for each point in x_a |
Computes the expected squared mean and expected mean of \(Z\) given a new observation \(x_a\).
Parameters : | x_a : numpy.ndarray
|
---|---|
Returns : | out : expected squared mean and expected mean for each point
|
Gaussian process over exp(log(l))
Gaussian process over log(l)
Initialize the GPs.
Parameters : | params_tl : np.ndarray
params_l : np.ndarray
|
---|
Vector of candidate values
Mean of the final approximation to \(\ell\).
Parameters : | x : numpy.ndarray
|
---|---|
Returns : | mean : numpy.ndarray
|
Notes
This is just the mean of the GP over \(\exp(\log\ell)\), i.e.:
Vector of observed values
Vector of observed plus candidate values
Marginal variance of the final approximation to \(\ell\).
Parameters : | x : numpy.ndarray
|
---|---|
Returns : | mean : numpy.ndarray
|
Notes
This is just the diagonal of the covariance of the GP over \(\log\ell\) multiplied by the squared mean of the GP over \(\exp(\log\ell)\), i.e.:
Load options.
Parameters : | kernel : Kernel
n_candidate : int
candidate_thresh : float
x_mean : float
x_var : float
optim_method : string
|
---|
Compute the approximate marginal functions funs by approximately marginalizing over the GP hyperparameters.
Parameters : | funs : list
n : int
params : list or tuple
|
---|
Number of candidate points
Number of observations
Number of observations plus candidates
Use slice sampling to samples new hyperparameters for the two GPs. Note that this will probably cause \(\bar{ell}(x_{sc})\) to change.
Parameters : | params : list of strings
nburn : int
|
---|
Vector of log-transformed observed values
Vector of candidate locations
Vector of observed locations
Vector of observed plus candidate locations