approximate_gaussian_process

pyapprox.approximate.approximate_gaussian_process(train_samples, train_vals, nu=inf, n_restarts_optimizer=5, verbosity=0)[source]

Compute a Gaussian process approximation of a function from a fixed data set using the Matern kernel

\[k(z_i, z_j) = \frac{1}{\Gamma(\nu)2^{\nu-1}}\Bigg( \frac{\sqrt{2\nu}}{l} \lVert z_i - z_j \rVert_2\Bigg)^\nu K_\nu\Bigg( \frac{\sqrt{2\nu}}{l} \lVert z_i - z_j \rVert_2\Bigg)\]

where \(\lVert \cdot \rVert_2\) is the Euclidean distance, \(\Gamma(\cdot)\) is the gamma function, \(K_\nu(\cdot)\) is the modified Bessel function.

Parameters
train_samplesnp.ndarray (nvars,nsamples)

The inputs of the function used to train the approximation

train_valsnp.ndarray (nvars,nsamples)

The values of the function at train_samples

kernel_nustring

The parameter \(\nu\) of the Matern kernel. When \(\nu\to\inf\) the Matern kernel is equivalent to the squared-exponential kernel.

n_restarts_optimizerint

The number of local optimizeation problems solved to find the GP hyper-parameters

verbosityinteger

Controls the amount of information printed to screen

Returns
resultpyapprox.approximate.ApproximateResult

Result object with the following attributes

approxpyapprox.gaussian_process.GaussianProcess

The Gaussian process