# InverseWishart

final class InverseWishart(Ψ:Expression<LLT>, k:Expression<Real>) < Distribution<LLT>

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[_,_]>;
Ψ:LLT;
k:Real;
W:Random<Real[_,_]>;
M:Real[_,_];
U:Real[_,_];
Y:Random<LLT>;
X:Real[_,_];

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


### Factory Functions

Name Description
InverseWishart Create inverse-Wishart distribution.
InverseWishart Create inverse-Wishart distribution.
InverseWishart Create inverse-Wishart distribution.
InverseWishart Create inverse-Wishart distribution.
InverseWishart Create inverse-Wishart distribution.
InverseWishart Create inverse-Wishart distribution.
InverseWishart Create inverse-Wishart distribution.
InverseWishart Create inverse-Wishart distribution.

### Member Variables

Name Description
Ψ:Expression<LLT> Scale.
k:Expression<Real> Degrees of freedom.

### Factory Function Details

function InverseWishart(Ψ:Expression<LLT>, k:Expression<Real>) -> InverseWishart

Create inverse-Wishart distribution.

function InverseWishart(Ψ:Expression<LLT>, k:Real) -> InverseWishart

Create inverse-Wishart distribution.

function InverseWishart(Ψ:LLT, k:Expression<Real>) -> InverseWishart

Create inverse-Wishart distribution.

function InverseWishart(Ψ:LLT, k:Real) -> InverseWishart

Create inverse-Wishart distribution.

function InverseWishart(Ψ:Expression<Real[_,_]>, k:Expression<Real>) -> InverseWishart

Create inverse-Wishart distribution.

function InverseWishart(Ψ:Expression<Real[_,_]>, k:Real) -> InverseWishart

Create inverse-Wishart distribution.

function InverseWishart(Ψ:Real[_,_], k:Expression<Real>) -> InverseWishart

Create inverse-Wishart distribution.

function InverseWishart(Ψ:Real[_,_], k:Real) -> InverseWishart

Create inverse-Wishart distribution.