GPy.mappings package

Submodules

GPy.mappings.additive module

class GPy.mappings.additive.Additive(mapping1, mapping2, tensor=False)[source]

Bases: GPy.core.mapping.Mapping

Mapping based on adding two existing mappings together.

f(\mathbf{x}*) = f_1(\mathbf{x}*) + f_2(\mathbf(x)*)

Parameters:
  • mapping1 (GPy.mappings.Mapping) – first mapping to add together.
  • mapping2 (GPy.mappings.Mapping) – second mapping to add together.
  • tensor (bool) – whether or not to use the tensor product of input spaces
df_dX(dL_df, X)[source]
df_dtheta(dL_df, X)[source]
f(X)[source]
randomize()[source]

GPy.mappings.kernel module

class GPy.mappings.kernel.Kernel(X, output_dim=1, kernel=None)[source]

Bases: GPy.core.mapping.Mapping

Mapping based on a kernel/covariance function.

f(\mathbf{x}*) = \mathbf{A}\mathbf{k}(\mathbf{X}, \mathbf{x}^*) + \mathbf{b}

Parameters:
  • X (ndarray) – input observations containing \mathbf{X}
  • output_dim (int) – dimension of output.
  • kernel (GPy.kern.kern) – a GPy kernel, defaults to GPy.kern.RBF
df_dX(dL_df, X)[source]
df_dtheta(dL_df, X)[source]
f(X)[source]
randomize()[source]

GPy.mappings.linear module

class GPy.mappings.linear.Linear(input_dim=1, output_dim=1, name='linear')[source]

Bases: GPy.core.mapping.Bijective_mapping

Mapping based on a linear model.

f(\mathbf{x}*) = \mathbf{W}\mathbf{x}^* + \mathbf{b}

Parameters:
  • X (ndarray) – input observations
  • output_dim (int) – dimension of output.
dL_dX(partial, X)[source]

The gradient of L with respect to the inputs to the mapping, where L is a function that is dependent on the output of the mapping, f.

df_dtheta(dL_df, X)[source]
f(X)[source]
g(f)[source]

GPy.mappings.mlp module

class GPy.mappings.mlp.MLP(input_dim=1, output_dim=1, hidden_dim=3)[source]

Bases: GPy.core.mapping.Mapping

Mapping based on a multi-layer perceptron neural network model.

f(\mathbf{x}*) = \mathbf{W}^0\boldsymbol{\phi}(\mathbf{W}^1\mathbf{x}+\mathbf{b}^1)^* + \mathbf{b}^0

where

\phi(\cdot) = \text{tanh}(\cdot)

Parameters:
  • X (ndarray) – input observations
  • output_dim (int) – dimension of output.
  • hidden_dim (int or list of ints.) – dimension of hidden layer. If it is an int, there is one hidden layer of the given dimension. If it is a list of ints there are as manny hidden layers as the length of the list, each with the given number of hidden nodes in it.
df_dX(dL_df, X)[source]
df_dtheta(dL_df, X)[source]
f(X)[source]
randomize()[source]

Module contents