rc.gpf.kernels§
Contains extensions to gpflow.kernels.
Classes§
Base class for stationary kernels, i.e. kernels that only |
|
The radial basis function (RBF) or squared exponential kernel. The kernel equation is |
Module Contents§
- class MOStationary(variance, lengthscales, name='Kernel', active_dims=None)§
Bases:
gpflow.kernels.AnisotropicStationary
,gpflow.kernels.Kernel
Base class for stationary kernels, i.e. kernels that only depend on
d = x - x’
Derived classes should implement K_d(self, d): Returns the kernel evaluated on d, which is the pairwise difference matrix, scaled by the lengthscale parameter ℓ (i.e. [(X - X2ᵀ) / ℓ]). The last axis corresponds to the input dimension.
- property lengthscales_neat§
The kernel lengthscales as an (L,M) matrix.
- K_diag(X)§
The kernel diagonal.
- Parameters:
X – An (N,M) Tensor.
Returns: An (L, N, L, N) Tensor.
- K_unit_variance(X, X2=None)§
The kernel with variance=ones(). This can be cached during optimisations where only the variance is trainable.
- Parameters:
X – An (n,M) Tensor.
X2 – An (N,M) Tensor.
Returns: An (L,N,L,N) Tensor.
- abstractmethod K_d_unit_variance(d)§
The kernel with variance=ones(). This can be cached during optimisations where only the variance is trainable.
- Parameters:
d – An (L,N,L,N,M) Tensor.
Returns: An (L,N,L,N) Tensor.
- K_d_apply_variance(K_d_unit_variance)§
Multiply the unit variance kernel by the kernel variance, and reshape.
- Parameters:
K_d_unit_variance – An (L,N,L,N) Tensor.
Returns: An (LN,LN) Tensor
- K_d(d)§
The kernel.
- Parameters:
d – An (L,N,L,N,M) Tensor.
Returns: An (LN,LN) Tensor.
- class RBF(variance, lengthscales, name='Kernel', active_dims=None)§
Bases:
MOStationary
The radial basis function (RBF) or squared exponential kernel. The kernel equation is
k(d) = σ² exp{-½ r²}
where: r is the Euclidean distance between the input points, scaled by the lengthscales parameter ℓ. σ² is the variance parameter
Functions drawn from a MOGP with this kernel are infinitely differentiable!
- K_d_unit_variance(d)§
The kernel with variance=ones(). This can be cached during optimisations where only the variance is trainable.
- Parameters:
d – An (L,N,L,N,M) Tensor.
Returns: An (L,N,L,N) Tensor.