Annulus Distribution

class pints.toy.AnnulusLogPDF(dimensions=2, r0=10, sigma=1)[source]

Toy distribution based on a d-dimensional distribution of the form

\[f(x|r_0, \sigma) \propto e^{-(|x|-r_0)^2 / {2\sigma^2}}\]

where \(x\) is a d-dimensional real, and \(|x|\) is the Euclidean norm.

This distribution is roughly a one-dimensional Gaussian distribution centred on \(r0\), that is smeared over the surface of a hypersphere of the same radius. In two dimensions, the density looks like a circular annulus.

Extends pints.LogPDF.

Parameters:
  • dimensions (int) – The dimensionality of the space.
  • r0 (float) – The radius of the hypersphere and is approximately the mean normed distance from the origin.
  • sigma (float) – The width of the annulus; approximately the standard deviation of normed distance.
distance(samples)[source]

Calculates a measure of normed distance of samples from exact mean and covariance matrix assuming uniform prior with bounds given by suggested_bounds().

See ToyLogPDF.distance().

evaluateS1(x)[source]

See LogPDF.evaluateS1().

mean()[source]

Returns the mean of this distribution.

mean_normed()[source]

Returns the mean of the normed distance from the origin.

moment_normed(order)[source]

Returns a given moment of the normed distance from the origin.

n_parameters()[source]

Returns the dimension of the space this LogPDF is defined over.

r0()[source]

Returns r0.

sample(n_samples)[source]

See ToyLogPDF.sample().

sigma()[source]

Returns sigma

suggested_bounds()[source]

See ToyLogPDF.suggested_bounds().

var_normed()[source]

Returns the variance of the normed distance from the origin.