bayespy.inference.vmp.nodes.gaussian.GaussianWishartDistribution

class bayespy.inference.vmp.nodes.gaussian.GaussianWishartDistribution[source]

Class for the VMP formulas of Gaussian-Wishart variables.

Currently, supports only vector variables.

\log p(\mathbf{x}, \mathbf{\Lambda} | \boldsymbol{\mu},
\alpha, n, \mathbf{V})
=&
- \frac{1}{2} \alpha \mathbf{x}^T \mathbf{\Lambda} \mathbf{x}
+ \frac{1}{2} \alpha \mathbf{x}^T \mathbf{\Lambda} \boldsymbol{\mu}
+ \frac{1}{2} \alpha \boldsymbol{\mu}^T \mathbf{\Lambda} \mathbf{x}
- \frac{1}{2} \alpha \boldsymbol{\mu}^T \mathbf{\Lambda} \boldsymbol{\mu}
+ \frac{1}{2} \log|\mathbf{\Lambda}|
+ \frac{D}{2} \log\alpha
- \frac{D}{2} \log(2\pi)
\\ &
- \frac{1}{2} \mathrm{tr}(\mathbf{V}\mathbf{\Lambda})
+ \frac{n-d-1}{2} \log|\mathbf{\Lambda}|
- \frac{nd}{2}\log 2
- \frac{n}{2} \log|\mathbf{V}|
- \log\Gamma_d(\frac{n}{2})

Posterior approximation:

\log q(\mathbf{x}, \mathbf{\Lambda})
=&
\mathbf{x}^T \mathbf{\Lambda} \boldsymbol{\phi}_1
+ \phi_2 \mathbf{x}^T \mathbf{\Lambda} \mathbf{x}
+ \mathrm{tr}(\mathbf{\Lambda} \mathbf{\Phi}_3)
+ \phi_4 \log|\mathbf{\Lambda}|
+ g(\boldsymbol{\phi}_1, \phi_2, \mathbf{\Phi}_3, \phi_4)
+ f(\mathbf{x}, \mathbf{\Lambda})

__init__()

Methods

__init__()

compute_cgf_from_parents(u_mu_alpha, u_n, u_V)

Compute \mathrm{E}_{q(p)}[g(p)]

compute_fixed_moments_and_f(x, Lambda[, mask])

Compute the moments and f(x) for a fixed value.

compute_gradient(g, u, phi)

Compute the standard gradient with respect to the natural parameters.

compute_logpdf(u, phi, g, f, ndims)

Compute E[log p(X)] given E[u], E[phi], E[g] and E[f].

compute_message_to_parent(parent, index, u, ...)

Compute the message to a parent node.

compute_moments_and_cgf(phi[, mask])

Compute the moments and g(\phi).

compute_phi_from_parents(u_mu_alpha, u_n, u_V)

Compute the natural parameter vector given parent moments.

compute_weights_to_parent(index, weights)

Maps the mask to the plates of a parent.

plates_from_parent(index, plates)

Resolve the plate mapping from a parent.

plates_to_parent(index, plates)

Resolves the plate mapping to a parent.

random(*params[, plates])

Draw a random sample from the distribution.

squeeze(axis)

Squeeze a plate axis from the distribution