3.0 API Reference

BayesianIntegral.GaussianKernelHyperparametersType
GaussianKernelHyperparameters

This contains the hyperparameters for the gaussian kernel. The functional form for correlation between xp and xq is w0 exp( -0.5 * \sum{d=1}^D ((x{p,d} - x{q,d})/wd)^2) where D is the number of dimensions. and each term of the summation is a different dimension of xp and x_q.

source
BayesianIntegral.K_matrixMethod
K_matrix(X::Array{Float64,2}, cov_func::Function, cov_func_parameters::GaussianKernelHyperparameters, noise::Float64 = 0.0)

Returns a Kmatrix together with marginal K matrices (marginal over each hyperparameter). THe covfunc should be a function with a signature like that of gaussian_kernel.

source
BayesianIntegral.K_matrix_with_marginalsMethod
K_matrix_with_marginals(X::Array{Float64,2}, cov_func::Function, cov_func_parameters::GaussianKernelHyperparameters, noise::Float64 = 0.0)

Returns a K_matrix together with marginal K matrices (marginal over each hyperparameter)

source
BayesianIntegral.calibrate_by_ML_with_SGDMethod
calibrate_by_ML_with_SGD(X, y, cov_func_parameters, steps, batch_size, step_multiple, noise, twister)

Trains kriging hyperparameters by maximising marginal likelihood with stochastic gradient descent.

source
BayesianIntegral.correlation_vector_of_a_pointMethod
correlation_vector_of_a_point(x::AbstractArray{T,1},X::AbstractArray{R,2}, cov_func::Function, cov_func_parameters::GaussianKernelHyperparameters) where T<:Real where R<:Real

This calculates the correlations of a point with each point in the X array.

source
BayesianIntegral.evaluateMethod
evaluate(modl::KrigingModel, PointToExamine::AbstractArray{T,1}) where T<:Real

Returns the kriging predictor value (ordinary kriging estimate) at the given point.

source
BayesianIntegral.expected_improvementMethod
expected_improvement(modl::KrigingModel, fmin::Real, PointToExamine::AbstractArray{<:Real,1})

Computes the expected improvement (Jones, Schonlau, Welch Equation 15) at a point. Returns how much improvement over the current best value fmin is expected.

source
BayesianIntegral.gaussian_kernelMethod
gaussian_kernel(x1::Array{Float64,1}, x2::Array{Float64,1}, cov_func_parameters::GaussianKernelHyperparameters)

Returns a covariance estimated with a gaussian kernel.

source
BayesianIntegral.integrateMethod
integrate(modl::KrigingModel, prob_means::AbstractArray{U,1}, covar::Hermitian) where U<:Real

Returns the expectation and variance of the integral of a kriging model given the probabilities described by a multivariate normal with means (in each dimension) of probmeans and covariance matrix covar. The integration performed is: int{x in X} f(x) p(x) dx Where f(x) is the function which is approximated in the kriging map by an exponential covariance function and p(x) is the pdf which is multivariate gaussian.

source
BayesianIntegral.log_likelihoodMethod
log_likelihood( y::Array{Float64,1},  K::Hermitian{Float64,Array{Float64,2}}; invK::Hermitian{Float64,Array{Float64,2}} = inv(K), determinant = det(K))

The log likelihood of a kriging model with values y and covariances K. invK and the determinant can be fed in as well to prevent additional operations. Note that the normalising constant is excluded from the log likelihood here because it is not relevent for optimising hyperparameters.

source
BayesianIntegral.marginal_gaussian_kernelMethod
marginal_gaussian_kernel(x1::Array{Float64}, x2::Array{Float64}, cov_func_parameters::GaussianKernelHyperparameters)

Returns a covariance estimated with a gaussian kernel. Also returns the marginal covariances (how does each covariance change by bumping each hyperparameter).

source
BayesianIntegral.marginal_likelihood_gaussian_derivativesMethod
marginal_likelihood_gaussian_derivatives(X::Array{Float64,2}, y::Array{Float64,1}, w_0::Float64, w_i::Array{Float64,1}, noise::Float64 = 0.0)

The marginal likelihoods (along each parameter) of a kriging model are returned. In addition the K matrix and the inverse K matrix are returned (to allow programers to use them as generated here and no redo them).

source
BayesianIntegral.predicted_errorMethod
predicted_error(modl::KrigingModel, PointToExamine::AbstractArray{T,1}) where T<:Real

Returns the predicted standard error (square root of kriging variance) at the given point. Uses Equation 9 of Jones, Schonlau, Welch with ordinary kriging correction.

source
BayesianIntegral.sampleMethod
sample(twister::MersenneTwister, dim::Integer, batch_size::Integer)

This does sampling with or without replacement.

source