Gaussian distribution

class pints.toy.GaussianLogPDF(mean=[0, 0], sigma=[1, 1])[source]

Toy distribution based on a multivariate (unimodal) Normal/Gaussian distribution.

Extends pints.toy.ToyLogPDF.

Parameters:
  • mean – The distribution mean (specified as a vector).

  • sigma – The distribution’s covariance matrix. Can be given as either a matrix or a vector (in which case diag(sigma) will be used. Should be symmetric and positive-semidefinite.

distance(samples)[source]

Returns the Kullback-Leibler divergence.

See pints.toy.ToyLogPDF.distance().

evaluateS1(x)[source]

See pints.LogPDF.evaluateS1().

kl_divergence(samples)[source]

Calculates the Kullback-Leibler divergence between a given list of samples and the distribution underlying this LogPDF.

The returned value is (near) zero for perfect sampling, and then increases as the error gets larger.

See: https://en.wikipedia.org/wiki/Kullback-Leibler_divergence

n_parameters()[source]

See pints.LogPDF.n_parameters().

sample(n)[source]

See pints.toy.ToyLogPDF.sample().

suggested_bounds()

Returns suggested boundaries for prior.