bayespy.inference.vmp.transformations.RotateGaussianARD¶
- class bayespy.inference.vmp.transformations.RotateGaussianARD(X, *alpha, axis=-1, precompute=False, subset=None)[source]¶
Rotation parameter expansion for
bayespy.nodes.GaussianARD
The model:
alpha ~ N(a, b) X ~ N(mu, alpha)
X can be an array (e.g., GaussianARD).
Transform q(X) and q(alpha) by rotating X.
Requirements: * X and alpha do not contain any observed values
- __init__(X, *alpha, axis=-1, precompute=False, subset=None)[source]¶
Precompute tells whether to compute some moments once in the setup function instead of every time in the bound function. However, they are computed a bit differently in the bound function so it can be useful too. Precomputation is probably beneficial only when there are large axes that are not rotated (by R nor Q) and they are not contained in the plates of alpha, and the dimensions for R and Q are quite small.
Methods
__init__
(X, *alpha[, axis, precompute, subset])Precompute tells whether to compute some moments once in the setup function instead of every time in the bound function.
bound
(R[, logdet, inv, Q])get_bound_terms
(R[, logdet, inv, Q])nodes
()rotate
(R[, inv, logdet, Q])setup
([plate_axis])This method should be called just before optimization.