gpflow.inducing_variables#

Modules#

Classes#

gpflow.inducing_variables.FallbackSeparateIndependentInducingVariables#

class gpflow.inducing_variables.FallbackSeparateIndependentInducingVariables(inducing_variable_list)[source]#

Bases: MultioutputInducingVariables

Separate set of inducing variables for each independent latent process.

This class is designated to be used to:

  • provide a general interface for multioutput kernels constructed from independent latent processes,

  • only require the specification of Kuu and Kuf.

All multioutput kernels constructed from independent latent processes allow the inducing variables to be specified in the latent processes, and a reasonably efficient method (i.e. one that takes advantage of the independence in the latent processes) can be specified quite generally by only requiring the following covariances:

  • Kuu: [L, M, M],

  • Kuf: [L, M, N, P].

In gpflow/multioutput/conditionals.py we define a conditional() implementation for this combination. We specify this code path for all kernels which inherit from IndependentLatentBase. This set-up allows inference with any such kernel to be implemented by specifying only Kuu() and Kuf().

We call this the base class, since many multioutput GPs that are constructed from independent latent processes acutally allow even more efficient approximations. However, we include this code path, as it does not require specifying a new conditional() implementation.

We use a different definition of inducing variables for each latent process. Note: each object should have the same number of inducing variables, M.

Parameters:

inducing_variable_list (Sequence[InducingVariables]) –

property num_inducing: Tensor#

Returns the number of inducing variables, relevant for example to determine the size of the variational distribution.

Return type:

Tensor

property shape: Optional[Tuple[Optional[int], ...]]#

Return the shape of these inducing variables.

Shape should be some variation of [M, D, P], where:

  • M is the number of inducing variables.

  • D is the number of input dimensions.

  • P is the number of output dimensions (1 if this is not a multi-output inducing variable).

Return type:

Optional[Tuple[Optional[int], ...]]

gpflow.inducing_variables.FallbackSharedIndependentInducingVariables#

class gpflow.inducing_variables.FallbackSharedIndependentInducingVariables(inducing_variable)[source]#

Bases: MultioutputInducingVariables

Shared definition of inducing variables for each independent latent process.

This class is designated to be used to:

  • provide a general interface for multioutput kernels constructed from independent latent processes,

  • only require the specification of Kuu and Kuf.

All multioutput kernels constructed from independent latent processes allow the inducing variables to be specified in the latent processes, and a reasonably efficient method (i.e. one that takes advantage of the independence in the latent processes) can be specified quite generally by only requiring the following covariances:

  • Kuu: [L, M, M],

  • Kuf: [L, M, N, P].

In gpflow/conditionals/multioutput/conditionals.py we define a conditional() implementation for this combination. We specify this code path for all kernels which inherit from IndependentLatentBase. This set-up allows inference with any such kernel to be implemented by specifying only Kuu() and Kuf().

We call this the base class, since many multioutput GPs that are constructed from independent latent processes acutally allow even more efficient approximations. However, we include this code path, as it does not require specifying a new conditional() implementation.

Here, we share the definition of inducing variables between all latent processes.

Parameters:

inducing_variable (InducingVariables) –

property num_inducing: Tensor#

Returns the number of inducing variables, relevant for example to determine the size of the variational distribution.

Return type:

Tensor

property shape: Optional[Tuple[Optional[int], ...]]#

Return the shape of these inducing variables.

Shape should be some variation of [M, D, P], where:

  • M is the number of inducing variables.

  • D is the number of input dimensions.

  • P is the number of output dimensions (1 if this is not a multi-output inducing variable).

Return type:

Optional[Tuple[Optional[int], ...]]

gpflow.inducing_variables.InducingPatches#

class gpflow.inducing_variables.InducingPatches(Z, name=None)[source]#

Bases: InducingPoints

Parameters:
  • Z (Union[int, float, Sequence[Any], ndarray[Any, Any], Tensor, Variable, Parameter]) –

  • name (Optional[str]) –

gpflow.inducing_variables.InducingPoints#

class gpflow.inducing_variables.InducingPoints(Z, name=None)[source]#

Bases: InducingPointsBase

Real-space inducing points

Parameters:
  • Z (Union[int, float, Sequence[Any], ndarray[Any, Any], Tensor, Variable, Parameter]) –

  • name (Optional[str]) –

gpflow.inducing_variables.InducingVariables#

class gpflow.inducing_variables.InducingVariables(name=None)[source]#

Bases: Module, ABC

Abstract base class for inducing variables.

abstract property num_inducing: Tensor#

Returns the number of inducing variables, relevant for example to determine the size of the variational distribution.

Return type:

Tensor

abstract property shape: Optional[Tuple[Optional[int], ...]]#

Return the shape of these inducing variables.

Shape should be some variation of [M, D, P], where:

  • M is the number of inducing variables.

  • D is the number of input dimensions.

  • P is the number of output dimensions (1 if this is not a multi-output inducing variable).

Return type:

Optional[Tuple[Optional[int], ...]]

gpflow.inducing_variables.MultioutputInducingVariables#

class gpflow.inducing_variables.MultioutputInducingVariables(name=None)[source]#

Bases: InducingVariables

Multioutput Inducing Variables Base class for methods which define a collection of inducing variables which in some way can be grouped. The main example is where the inducing variables consist of outputs of various independent GPs. This can be because our model uses multiple independent GPs (SharedIndependent, SeparateIndependent) or because it is constructed from independent GPs (eg IndependentLatent, LinearCoregionalization).

gpflow.inducing_variables.Multiscale#

class gpflow.inducing_variables.Multiscale(Z, scales)[source]#

Bases: InducingPointsBase

Multi-scale inducing variables

Originally proposed in Lázaro-Gredilla and Figueiras-Vidal [LazaroGFV09].

Parameters:
  • Z (Union[int, float, Sequence[Any], ndarray[Any, Any], Tensor, Variable, Parameter]) –

  • scales (Union[int, float, Sequence[Any], ndarray[Any, Any], Tensor, Variable, Parameter]) –

gpflow.inducing_variables.SeparateIndependentInducingVariables#

class gpflow.inducing_variables.SeparateIndependentInducingVariables(inducing_variable_list)[source]#

Bases: FallbackSeparateIndependentInducingVariables

Here, we define the same inducing variables as in the base class. However, this class is intended to be used without the constraints on the shapes that Kuu() and Kuf() return. This allows a custom conditional() to provide the most efficient implementation.

Parameters:

inducing_variable_list (Sequence[InducingVariables]) –

gpflow.inducing_variables.SharedIndependentInducingVariables#

class gpflow.inducing_variables.SharedIndependentInducingVariables(inducing_variable)[source]#

Bases: FallbackSharedIndependentInducingVariables

Here, we define the same inducing variables as in the base class. However, this class is intended to be used without the constraints on the shapes that Kuu() and Kuf() return. This allows a custom conditional() to provide the most efficient implementation.

Parameters:

inducing_variable (InducingVariables) –