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:

𝚺∼𝒲−1(𝚿,ν)𝑾∼ℳ𝒩(𝑴,𝑨,𝚺)𝒀∼𝒩(𝑿𝑾,𝚺),\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.