runlmc.kern.matern32 module

class runlmc.kern.matern32.Matern32(inv_lengthscale=1, name='matern32', active_dims=None)[source]

Bases: runlmc.kern.stationary_kern.StationaryKern

This class defines the Matérn-3/2 kernel \(k\).

\[k(r) = (1+r\gamma\sqrt{3})\exp \left(-\gamma r\sqrt{3}\right)\]
Parameters:
from_dist(dists)[source]
Parameters:distsN-size numpy array of positive (Euclidean) distances.
Returns:kernel value at each of the given distances
kernel_gradient(dists)[source]

Let this kernel be parameterized by some parameters \(\boldsymbol\theta\in\mathbb{R}^p\). For every \(\theta_j\in\boldsymbol\theta\), at any given distance \(d\), we can compute the derivative \(\partial_{\theta_j}k(d)\). For the evaluation of this partial derivative at multiple places, \(\textbf{d}\), we call the vector of partial derivatives \(\partial_{\theta_j}k(\textbf{d})\).

Parameters:dists – a one-dimensional array of distances corresponding to \(\textbf{d}\), above.
Returns:An iterable whose \(j\)-th entry is \(\partial_{\theta_j}k(\textbf{d})\).
to_gpy()[source]
Returns:GPy version of this kernel.
update_gradient(grad)[source]
Parameters:grad – a one-dimensional array, representing the gradient vector \(\nabla_{\boldsymbol\theta}L\) for the likelihood with respect to this kernel’s parameters, in the same order of parameters as the row order returned by kernel_gradient().