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
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.

num_inducing

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

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

with_name_scope(method)

Decorator to automatically enter the module name scope.

Parameters

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

property num_inducing: tensorflow.python.framework.ops.Tensor

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

Return type

Tensor

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
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.

num_inducing

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

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

with_name_scope(method)

Decorator to automatically enter the module name scope.

Parameters

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

property num_inducing: tensorflow.python.framework.ops.Tensor

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

Return type

Tensor

gpflow.inducing_variables.InducingPatches

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

Bases: gpflow.inducing_variables.inducing_variables.InducingPoints

Attributes
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.

num_inducing

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

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

with_name_scope(method)

Decorator to automatically enter the module name scope.

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

  • name (Optional[str]) –

gpflow.inducing_variables.InducingPoints

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

Bases: gpflow.inducing_variables.inducing_variables.InducingPointsBase

Real-space inducing points

Attributes
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.

num_inducing

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

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

with_name_scope(method)

Decorator to automatically enter the module name scope.

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

  • name (Optional[str]) –

gpflow.inducing_variables.InducingVariables

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

Bases: gpflow.base.Module

Abstract base class for inducing variables.

Attributes
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.

num_inducing

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

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

with_name_scope(method)

Decorator to automatically enter the module name scope.

abstract property num_inducing: tensorflow.python.framework.ops.Tensor

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

Return type

Tensor

gpflow.inducing_variables.MultioutputInducingVariables

class gpflow.inducing_variables.MultioutputInducingVariables(name=None)[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
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.

num_inducing

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

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

with_name_scope(method)

Decorator to automatically enter the module name scope.

gpflow.inducing_variables.Multiscale

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

Bases: gpflow.inducing_variables.inducing_variables.InducingPointsBase

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
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.

num_inducing

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

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

with_name_scope(method)

Decorator to automatically enter the module name scope.

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

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

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
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.

num_inducing

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

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

with_name_scope(method)

Decorator to automatically enter the module name scope.

Parameters

inducing_variable_list (Sequence[Union[ndarray, 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
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.

num_inducing

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

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

with_name_scope(method)

Decorator to automatically enter the module name scope.

Parameters

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

gpflow.inducing_variables.inducing_variables

gpflow.inducing_variables.multioutput