SparseLatent#

class sep241latent.SparseLatent(mean_func, cov_func)#

Bases: object

This class is like pymc3.gp.Latent, except it uses a sparse covariance matrix to save time and memory and only supports prior. cov_func must be an instance of SparseCov. See documentation of SparseCov for use conditions.

Parameters:
  • mean_func (pymc3.gp.mean.Mean) – The mean function.

  • cov_func (SparseCov) – The covariance function. See SparseCov.

prior(name, X, reparameterize=True, jitter='auto', initval=None)#

Returns the GP prior distribution evaluated over the input locations X. This is the prior probability over the space of functions described by its mean and covariance function.

Parameters:
  • name (string) – Name of the random variable.

  • X (array-like) – Function input values.

  • reparameterize (bool) – Re-parameterize the distribution by rotating the random variable by the Cholesky factor of the covariance matrix.

  • jitter (scalar or 'auto') – A correction added to the diagonal of the covariance matrix for numerical stability. If set to ‘auto’, computes a minimum to ensure the covariance matrix is positive semi-definite. Defaults to ‘auto’.

  • initval (array-like, optional) – Initial value for rotated distribution. Defaults to None.