pfjax.mvn_bridge
Multivariate normal bridge proposals.
Suppose we have the multivariate normal model
::
W ~ N(mu_W, Sigma_W)
X | W ~ N(W + mu_XW, Sigma_XW)
Y | X, W ~ N(AX, Omega).
We are interested in calculating the mean and variance of p(W|Y).
Functions:
| Name | Description |
|---|---|
mvn_bridge_pars |
Calculate the unconditional mean of Y, the variance of Y and the covariance between W and Y. |
mvn_bridge_mv |
Calculate the mean and variance of |
mvn_bridge_pars(mu_W, Sigma_W, mu_XW, Sigma_XW, A, Omega)
Calculate the unconditional mean of Y, the variance of Y and the covariance between W and Y.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mu_W
|
Mean of W. |
required | |
Sigma_W
|
Variance of W. |
required | |
mu_XW
|
Mean fo X|W. |
required | |
Sigma_XW
|
Variance of X|W. |
required | |
A
|
Matrix to obtain mean of Y given X,W. |
required | |
Omega
|
Variance of Y|X,W. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Tuple |
|
|
|
||
|
||
|
Source code in src/pfjax/mvn_bridge.py
mvn_bridge_mv(mu_W, Sigma_W, mu_Y, AS_W, Sigma_Y, Y)
Calculate the mean and variance of p(W|Y).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mu_W
|
Mean of W. |
required | |
Sigma_W
|
Variance of W. |
required | |
mu_Y
|
Unconditional mean of Y. |
required | |
AS_W
|
Covariance of Y, W. |
required | |
Sigma_Y
|
Unconditional variance of Y. |
required | |
Y
|
Observed Y. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Tuple |
|
|
|
||
|