Skip to content

InverseWishartDistribution


final class InverseWishartDistribution<Arg1, Arg2>(Ψ:Arg1, k:Arg2) < Distribution<Real[_,_]>

Inverse Wishart distribution.

This is typically used to establish a conjugate prior for a Bayesian multivariate linear regression:

\begin{align*} \boldsymbol{\Sigma} &\sim \mathcal{W}^{-1}(\boldsymbol{\Psi}, \nu) \\ \mathbf{W} &\sim \mathcal{MN}(\mathbf{M}, \mathbf{A}, \boldsymbol{\Sigma}) \\ \mathbf{Y} &\sim \mathcal{N}(\mathbf{X}\mathbf{W}, \boldsymbol{\Sigma}), \end{align*}

where \mathbf{X} are inputs and \mathbf{Y} are outputs.

The relationship is established in code as follows:

V:Random<Real[_,_]>;
Ψ:Real[_,_];
k:Real;
W:Random<Real[_,_]>;
M:Real[_,_];
U:Real[_,_];
Y:Random<Real[_,_]>;
X:Real[_,_];

V ~ InverseWishart(Ψ, k);
W ~ Gaussian(M, U, V);
Y ~ Gaussian(X*W, V);

Member Variables

Name Description
Ψ:Arg1 Scale.
k:Arg2 Degrees of freedom.