gpflux.architectures.constant_input_dim_deep_gp
#
This module provides build_constant_input_dim_deep_gp()
to build a Deep GP of
arbitrary depth where each hidden layer has the same input dimensionality as the data.
Module Contents#
- class Config[source]#
The configuration used by
build_constant_input_dim_deep_gp()
.- num_inducing: int[source]#
The number of inducing variables, M. The Deep GP uses the same number of inducing variables in each layer.
- inner_layer_qsqrt_factor: float[source]#
A multiplicative factor used to rescale the hidden layers’
q_sqrt
. Typically this value is chosen to be small (e.g., 1e-5) to reduce noise at the start of training.
- likelihood_noise_variance: float[source]#
The variance of the
Gaussian
likelihood that is used by the Deep GP.
- whiten: bool = True[source]#
Determines the parameterisation of the inducing variables. If
True
, :math:p(u) = N(0, I)
, otherwise :math:p(u) = N(0, K_{uu})
. .. seealso::gpflux.layers.GPLayer.whiten
- _construct_kernel(input_dim: int, is_last_layer: bool) gpflow.kernels.SquaredExponential [source]#
Return a
gpflow.kernels.SquaredExponential
kernel with ARD lengthscales set to 2 and a small kernel variance of 1e-6 if the kernel is part of a hidden layer; otherwise, the kernel variance is set to 1.0.- Parameters:
input_dim – The input dimensionality of the layer.
is_last_layer – Whether the kernel is part of the last layer in the Deep GP.
- build_constant_input_dim_deep_gp(X: numpy.ndarray, num_layers: int, config: Config) gpflux.models.DeepGP [source]#
Build a Deep GP consisting of
num_layers
GPLayer
s. All the hidden layers have the same input dimension as the data, that is,X.shape[1]
.The architecture is largely based on Salimbeni and Deisenroth [SD17], with the most notable difference being that we keep the hidden dimension equal to the input dimensionality of the data.
Note
This architecture might be slow for high-dimensional data.
Note
This architecture assumes a
Gaussian
likelihood for regression tasks. Specify a different likelihood for performing other tasks such as classification.- Parameters:
X – The training input data, used to retrieve the number of datapoints and the input dimension and to initialise the inducing point locations using k-means. A tensor of rank two with the dimensions
[num_data, input_dim]
.num_layers – The number of layers in the Deep GP.
config – The configuration for (hyper)parameters. See
Config
for details.