GPy.mappings package

Submodules

GPy.mappings.additive module

class Additive(mapping1, mapping2)[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.
f(X)[source]
gradients_X(dL_dF, X)[source]
update_gradients(dL_dF, X)[source]

GPy.mappings.compound module

class Compound(mapping1, mapping2)[source]

Bases: GPy.core.mapping.Mapping

Mapping based on passing one mapping through another

\[f(\mathbf{x}) = f_2(f_1(\mathbf{x}))\]
Parameters:
  • mapping1 (GPy.mappings.Mapping) – first mapping
  • mapping2 (GPy.mappings.Mapping) – second mapping
f(X)[source]
gradients_X(dL_dF, X)[source]
update_gradients(dL_dF, X)[source]

GPy.mappings.constant module

class Constant(input_dim, output_dim, value=0.0, name='constmap')[source]

Bases: GPy.core.mapping.Mapping

A Linear mapping.

\[F(\mathbf{x}) = c\]
Parameters:
  • input_dim (int) – dimension of input.
  • output_dim (int) – dimension of output.
Param:

value the value of this constant mapping

f(X)[source]
gradients_X(dL_dF, X)[source]
to_dict()[source]
update_gradients(dL_dF, X)[source]

GPy.mappings.identity module

class Identity(input_dim, output_dim, name='identity')[source]

Bases: GPy.core.mapping.Mapping

A mapping that does nothing!

f(X)[source]
gradients_X(dL_dF, X)[source]
to_dict()[source]
update_gradients(dL_dF, X)[source]

GPy.mappings.kernel module

class Kernel(input_dim, output_dim, Z, kernel, name='kernmap')[source]

Bases: GPy.core.mapping.Mapping

Mapping based on a kernel/covariance function.

\[f(\mathbf{x}) = \sum_i lpha_i k(\mathbf{z}_i, \mathbf{x})\]

or for multple outputs

\[f_i(\mathbf{x}) = \sum_j lpha_{i,j} k(\mathbf{z}_i, \mathbf{x})\]
Parameters:
  • input_dim (int) – dimension of input.
  • output_dim (int) – dimension of output.
  • Z (ndarray) – input observations containing \(\mathbf{Z}\)
  • kernel (GPy.kern.kern) – a GPy kernel, defaults to GPy.kern.RBF
f(X)[source]
gradients_X(dL_dF, X)[source]
update_gradients(dL_dF, X)[source]

GPy.mappings.linear module

class Linear(input_dim, output_dim, name='linmap')[source]

Bases: GPy.core.mapping.Mapping

A Linear mapping.

\[F(\mathbf{x}) = \mathbf{A} \mathbf{x})\]
Parameters:
  • input_dim (int) – dimension of input.
  • output_dim (int) – dimension of output.
  • kernel (GPy.kern.kern) – a GPy kernel, defaults to GPy.kern.RBF
f(X)[source]
gradients_X(dL_dF, X)[source]
to_dict()[source]
update_gradients(dL_dF, X)[source]

GPy.mappings.mlp module

class MLP(input_dim=1, output_dim=1, hidden_dim=3, name='mlpmap')[source]

Bases: GPy.core.mapping.Mapping

Mapping based on a multi-layer perceptron neural network model, with a single hidden layer

f(X)[source]
gradients_X(dL_dF, X)[source]
update_gradients(dL_dF, X)[source]

GPy.mappings.mlpext module

class MLPext(input_dim=1, output_dim=1, hidden_dims=[3], prior=None, activation='tanh', name='mlpmap')[source]

Bases: GPy.core.mapping.Mapping

Mapping based on a multi-layer perceptron neural network model, with multiple hidden layers. Activation function is applied to all hidden layers. The output is a linear combination of the last layer features, i.e. the last layer is linear.

Parameters:
  • input_dim – number of input dimensions
  • output_dim – number of output dimensions
  • hidden_dims – list of hidden sizes of hidden layers
  • prior – variance of Gaussian prior on all variables. If None, no prior is used (default: None)
  • activation – choose activation function. Allowed values are ‘tanh’ and ‘sigmoid’
  • name
f(X)[source]
fix_parameters()[source]

Helper function that fixes all parameters

gradients_X(dL_dF, X)[source]
unfix_parameters()[source]

Helper function that unfixes all parameters

update_gradients(dL_dF, X)[source]

GPy.mappings.piecewise_linear module

class PiecewiseLinear(input_dim, output_dim, values, breaks, name='piecewise_linear')[source]

Bases: GPy.core.mapping.Mapping

A piecewise-linear mapping.

The parameters of this mapping are the positions and values of the function where it is broken (self.breaks, self.values).

Outside the range of the breaks, the function is assumed to have gradient 1

f(X)[source]
gradients_X(dL_dF, X)[source]
parameters_changed()[source]
update_gradients(dL_dF, X)[source]

Module contents