gpmp.kernel covariance helpers¶
Covariance functions and covariance-parameter initial guesses work with
backend-native arrays and plain covariance-parameter vectors, independently
from the optional gpmp.parameter display helpers.
Covariance functions¶
exponential_kernel, matern32_kernel, and maternp_kernel evaluate
correlation kernels as functions of a scaled distance. maternp_covariance
combines the Matern kernel with the GPmp covariance-parameter convention
[log(sigma2), -log(rho_0), ...] and is the usual covariance function for
anisotropic Matern models.
exponential_kernel¶
- gpmp.kernel.exponential_kernel(h)[source]
Exponential kernel.
\[k(h) = \exp(-h)\]- Parameters:
h (gnp.array, shape (n,)) – Distances between points.
- Returns:
Kernel values.
- Return type:
gnp.array, shape (n,)
matern32_kernel¶
maternp_kernel¶
- gpmp.kernel.maternp_kernel(p: int, h)[source]¶
Matérn kernel with half-integer regularity \(\nu = p + 1/2\).
Using the half-integer simplification (Watson 1922; Abramowitz & Stegun):
\[K(h) = \exp(-2\sqrt{\nu}\,h)\, \frac{\Gamma(p+1)}{\Gamma(2p+1)} \sum_{i=0}^{p} \frac{(p+i)!}{i!(p-i)!}\,(4\sqrt{\nu}h)^{\,p-i}\]- Parameters:
p (int) – Nonnegative integer with \(\nu = p+1/2\).
h (gnp.array) – Distances.
- Returns:
Kernel values.
- Return type:
gnp.array
maternp_covariance¶
Initial guesses¶
Initial-guess helpers construct a covariance-parameter vector from observation
points and values. They are often used as covparam0 for selection
procedures, or as a prior anchor for REMAP procedures.