High dimensional Gaussian distribution¶
-
class
pints.toy.
HighDimensionalGaussianLogPDF
(dimension=20, rho=0.5)[source]¶ High-dimensional zero-mean multivariate Gaussian log pdf, with off-diagonal correlations.
Specifically, the covariance matrix Sigma is constructed so that diagonal elements are integers: Sigma_i,i = i and off-diagonal elements are Sigma_i,j = rho * sqrt(i) * sqrt(j).
Extends
pints.toy.ToyLogPDF
.Parameters: - dimension (int) – Dimensions of multivariate Gaussian distribution (which must exceed 1).
- rho (float) – The correlation between pairs of parameter dimensions. Note that this
must be between
`-1 / (dimension - 1) and 1
so that the covariance matrix is positive semi-definite.
-
distance
(samples)[source]¶ Returns approximate Kullback-Leibler divergence between samples and underlying distribution.
-
kl_divergence
(samples)[source]¶ Returns approximate Kullback-Leibler divergence between samples and underlying distribution.
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