# gpflow.inducing_variables¶

## gpflow.inducing_variables.FallbackSeparateIndependentInducingVariables¶

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

Bases: gpflow.inducing_variables.multioutput.inducing_variables.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.

Attributes
inducing_variables
num_inducing
parameters
trainable_parameters

Methods

 __call__(*args, **kwargs) Call self as a function.
Parameters

inducing_variable_list (Sequence[Union[Tensor, Variable, Parameter]]) –

## gpflow.inducing_variables.FallbackSharedIndependentInducingVariables¶

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

Bases: gpflow.inducing_variables.multioutput.inducing_variables.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.

Attributes
inducing_variables
num_inducing
parameters
trainable_parameters

Methods

 __call__(*args, **kwargs) Call self as a function.
Parameters

inducing_variable (Union[Tensor, Variable, Parameter]) –

## gpflow.inducing_variables.InducingPatches¶

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

Bases: gpflow.inducing_variables.inducing_variables.InducingPoints

Attributes
num_inducing
parameters
trainable_parameters

Methods

 __call__(*args, **kwargs) Call self as a function.
Parameters
• Z (Union[int, float, Sequence[Any], Tensor, Variable, Parameter]) –

• name (Optional[str]) –

## gpflow.inducing_variables.InducingPoints¶

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

Real-space inducing points

Attributes
num_inducing
parameters
trainable_parameters

Methods

 __call__(*args, **kwargs) Call self as a function.
Parameters
• Z (Union[int, float, Sequence[Any], Tensor, Variable, Parameter]) –

• name (Optional[str]) –

## gpflow.inducing_variables.InducingVariables¶

class gpflow.inducing_variables.InducingVariables(*args, **kwargs)[source]

Bases: gpflow.base.Module

Abstract base class for inducing variables.

Attributes
num_inducing
parameters
trainable_parameters

Methods

 __call__(*args, **kwargs) Call self as a function.
Parameters
• args (Any) –

• kwargs (Any) –

abstract __len__()[source]

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

Return type

int

## gpflow.inducing_variables.MultioutputInducingVariables¶

class gpflow.inducing_variables.MultioutputInducingVariables(*args, **kwargs)[source]

Bases: gpflow.inducing_variables.inducing_variables.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).

Attributes
inducing_variables
num_inducing
parameters
trainable_parameters

Methods

 __call__(*args, **kwargs) Call self as a function.
Parameters
• args (Any) –

• kwargs (Any) –

## gpflow.inducing_variables.Multiscale¶

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

Multi-scale inducing variables

Originally proposed in

@incollection{NIPS2009_3876,
title = {Inter-domain Gaussian Processes for Sparse Inference using Inducing Features},
author = {Miguel L\'{a}zaro-Gredilla and An\'{\i}bal Figueiras-Vidal},
booktitle = {Advances in Neural Information Processing Systems 22},
year = {2009},
}

Attributes
num_inducing
parameters
trainable_parameters

Methods

 __call__(*args, **kwargs) Call self as a function.
Parameters
• Z (Union[int, float, Sequence[Any], Tensor, Variable, Parameter]) –

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

static _cust_square_dist(A, B, sc)[source]

Custom version of _square_dist that allows sc to provide per-datapoint length scales. sc: [N, M, D].

Parameters
• A (Union[Tensor, Variable, Parameter]) –

• B (Union[Tensor, Variable, Parameter]) –

• sc (Union[Tensor, Variable, Parameter]) –

Return type

Tensor

## gpflow.inducing_variables.SeparateIndependentInducingVariables¶

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

Bases: gpflow.inducing_variables.multioutput.inducing_variables.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.

Attributes
inducing_variables
num_inducing
parameters
trainable_parameters

Methods

 __call__(*args, **kwargs) Call self as a function.
Parameters

inducing_variable_list (Sequence[Union[Tensor, Variable, Parameter]]) –

## gpflow.inducing_variables.SharedIndependentInducingVariables¶

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

Bases: gpflow.inducing_variables.multioutput.inducing_variables.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.

Attributes
inducing_variables
num_inducing
parameters
trainable_parameters

Methods

 __call__(*args, **kwargs) Call self as a function.
Parameters

inducing_variable (Union[Tensor, Variable, Parameter]) –