bayespy.inference.vmp.nodes.beta.BetaDistribution¶
- class bayespy.inference.vmp.nodes.beta.BetaDistribution[source]¶
Class for the VMP formulas of beta variables.
Although the realizations are scalars (probability p), the moments is a two-dimensional vector: [log(p), log(1-p)].
- __init__()¶
Methods
__init__
()compute_cgf_from_parents
(u_alpha)Compute
compute_fixed_moments_and_f
(p[, mask])Compute the moments and for a fixed value.
compute_gradient
(g, u, phi)Compute the moments and .
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, ...)Compute the message to a parent node.
compute_moments_and_cgf
(phi[, mask])Compute the moments and .
compute_phi_from_parents
(u_alpha[, mask])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
(*phi[, plates])Draw a random sample from the distribution.
squeeze
(axis)Squeeze a plate axis from the distribution