pymc.Wishart#

class pymc.Wishart(name, *args, rng=None, dims=None, initval=None, observed=None, total_size=None, transform=UNSET, default_transform=UNSET, **kwargs)[source]#

Wishart log-likelihood.

The Wishart distribution is the probability distribution of the maximum-likelihood estimator (MLE) of the precision matrix of a multivariate normal distribution. If V=1, the distribution is identical to the chi-square distribution with nu degrees of freedom.

\[f(X \mid nu, T) = \frac{{\mid T \mid}^{nu/2}{\mid X \mid}^{(nu-k-1)/2}}{2^{nu k/2} \Gamma_p(nu/2)} \exp\left\{ -\frac{1}{2} Tr(TX) \right\}\]

where \(k\) is the rank of \(X\).

Support

\(X(p x p)\) positive definite matrix

Mean

\(nu V\)

Variance

\(nu (v_{ij}^2 + v_{ii} v_{jj})\)

Parameters:
nutensor_like of int

Degrees of freedom, > 0.

Vtensor_like of float

p x p positive definite matrix.

Notes

This distribution is unusable in a PyMC model. You should instead use LKJCholeskyCov or LKJCorr.

Methods

Wishart.dist(nu, V, *args, **kwargs)

Creates a tensor variable corresponding to the cls distribution.