mxfusion.components.distributions.gp.gp

Members

class mxfusion.components.distributions.gp.gp.GaussianProcess(X, kernel, mean=None, rand_gen=None, dtype=None, ctx=None)

Bases: mxfusion.components.distributions.distribution.Distribution

The Gaussian process distribution.

A Gaussian process consists of a kernel function and a mean function (optional). A collection of GP random variables follows a multi-variate normal distribution, where the mean is computed from the mean function (zero, if not given) and the covariance matrix is computed from the kernel function, both of which are computed given a collection of inputs.

Parameters:
  • X (Variable) – the input variables on which the random variables are conditioned.
  • kernel (Kernel) – the kernel of Gaussian process.
  • mean (Variable) – the mean of Gaussian process.
  • rand_gen (RandomGenerator) – the random generator (default: MXNetRandomGenerator).
  • dtype (numpy.float32 or numpy.float64) – the data type for float point numbers.
  • ctx (None or mxnet.cpu or mxnet.gpu) – the mxnet context (default: None/current context).
has_mean
static define_variable(X, kernel, shape=None, mean=None, rand_gen=None, dtype=None, ctx=None)

Creates and returns a set of random variables drawn from a Gaussian process.

Parameters:
  • X (Variable) – the input variables on which the random variables are conditioned.
  • kernel (Kernel) – the kernel of Gaussian process.
  • shape – the shape of the random variable(s) (the default shape is the same shape as X but the last

dimension is changed to one). :type shape: tuple or [tuple] :param mean: the mean of Gaussian process. :type mean: Variable :param rand_gen: the random generator (default: MXNetRandomGenerator). :type rand_gen: RandomGenerator :param dtype: the data type for float point numbers. :type dtype: numpy.float32 or numpy.float64 :param ctx: the mxnet context (default: None/current context). :type ctx: None or mxnet.cpu or mxnet.gpu

log_pdf_impl(X, random_variable, F=None, **kernel_params)

Computes the logarithm of the probability density function (PDF) of the Gaussian process.

Parameters:
  • X (MXNet NDArray or MXNet Symbol) – the input variables on which the random variables are conditioned.
  • random_variable (MXNet NDArray or MXNet Symbol) – the random_variable of which log-PDF is computed.
  • F – the MXNet computation mode (mxnet.symbol or mxnet.ndarray)
  • kernel_params ({str: MXNet NDArray or MXNet Symbol}) – the set of kernel parameters, provided as keyword arguments.
Returns:

log pdf of the distribution.

Rtypes:

MXNet NDArray or MXNet Symbol

draw_samples_impl(X, rv_shape, num_samples=1, F=None, **kernel_params)

Draw a number of samples from the Gaussian process.

Parameters:
  • X (MXNet NDArray or MXNet Symbol) – the input variables on which the random variables are conditioned.
  • rv_shape (tuple) – the shape of each sample.
  • num_samples (int) – the number of drawn samples (default: one).
  • F – the MXNet computation mode (mxnet.symbol or mxnet.ndarray).
  • kernel_params ({str: MXNet NDArray or MXNet Symbol}) – the set of kernel parameters, provided as keyword arguments.
Returns:

a set samples of the distribution.

Rtypes:

MXNet NDArray or MXNet Symbol

replicate_self(attribute_map=None)

The copy constructor for a Gaussian process distribution.