gpflow.kernels.base¶
Kernels form a core component of GPflow models and allow prior information to be encoded about a latent function of interest. The effect of choosing different kernels, and how it is possible to combine multiple kernels is shown in the “Using kernels in GPflow” notebook.
Broadcasting over leading dimensions: kernel.K(X1, X2) returns the kernel evaluated on every pair in X1 and X2. E.g. if X1 has shape [S1, N1, D] and X2 has shape [S2, N2, D], kernel.K(X1, X2) will return a tensor of shape [S1, N1, S2, N2]. Similarly, kernel.K(X1, X1) returns a tensor of shape [S1, N1, S1, N1]. In contrast, the return shape of kernel.K(X1) is [S1, N1, N1]. (Without leading dimensions, the behaviour of kernel.K(X, None) is identical to kernel.K(X, X).)
gpflow.kernels.base.ReducingCombination¶
- class gpflow.kernels.base.ReducingCombination(kernels, name=None)[source]¶
Bases:
gpflow.kernels.base.Combination
- Attributes
- active_dims
name
Returns the name of this module as passed or determined in the ctor.
name_scope
Returns a tf.name_scope instance for this class.
non_trainable_variables
Sequence of non-trainable variables owned by this module and its submodules.
on_separate_dimensions
Checks whether the kernels in the combination act on disjoint subsets of dimensions.
- parameters
submodules
Sequence of all sub-modules.
- trainable_parameters
trainable_variables
Sequence of trainable variables owned by this module and its submodules.
variables
Sequence of variables owned by this module and its submodules.
Methods
__call__
(X[, X2, full_cov, presliced])Call self as a function.
on_separate_dims
(other)Checks if the dimensions, over which the kernels are specified, overlap.
slice
(X[, X2])Slice the correct dimensions for use in the kernel, as indicated by self.active_dims.
slice_cov
(cov)Slice the correct dimensions for use in the kernel, as indicated by self.active_dims for covariance matrices.
with_name_scope
(method)Decorator to automatically enter the module name scope.
K
K_diag
- Parameters
kernels (
Sequence
[Kernel
]) –name (
Optional
[str
]) –