# IndependentInverseGamma

final class IndependentInverseGamma(α:Expression<Real>, β:Expression<Real[_]>) < Distribution<Real[_]>

Multivariate inverse-gamma distribution with independent components.

This is typically used to establish a conjugate prior for a Bayesian multivariate linear regression with $O$ number of outputs that are conditionally independent given the inputs:

where subscript $o$ denotes the (hyper)parameters of the $o$th element of the output vector, $\mathbf{X}$ are inputs, and $\mathbf{Y}$ are outputs.

The relationship is established in code as follows:

σ2:Random<Real[_]>;
α:Real;
β:Real[_];
W:Random<Real[_,_]>;
M:Real[_,_];
U:Real[_,_];
Y:Random<Real[_,_]>;
X:Real[_,_];

σ2 ~ InverseGamma(α, β);
W ~ Gaussian(M, U, σ2);
Y ~ Gaussian(X*W, σ2);


The advantage of using this approach over $O$ separate regressions is that expensive covariance operations are shared.

### Member Variables

Name Description
α:Expression<Real> Shape.
β:Expression<Real[_]> Scales.