MatrixNormal#
- class hybrid_aif.distributions.MatrixNormal[source]#
Bases:
ModuleW ~ MN(M, U, V)with shared column covariance; row structure external.Mis(..., d_obs, p)(p = dx + 1for an augmented head);V_invis(..., p, p), the column precision (V_inv += Σ E[x̃x̃ᵀ]). The row covariance is the noise, supplied by the consumer, and is not stored.- classmethod from_head(head, strength=1.0, anchor=False)[source]#
Prior centred on a known head:
point()reproduces it exactly;strengthis the pseudo-observation count on the column precision.
- stats(syx, sxx, count)[source]#
Package one tick’s (noise-whitened, responsibility-weighted) regression statistic:
syx = Σ y x̃ᵀ(..., d_obs, p),sxx = Σ E[x̃x̃ᵀ](..., p, p), and the responsibility mass.
- absorb(stats, lr=1.0, decay=1.0)[source]#
Conjugate Bayesian-regression update in natural coordinates:
V_inv += sxxand(M V_inv) += syx, then solve forM.
- sample(key, row_chol)[source]#
One head draw
M + L_row Z L_colᵀ; the row Cholesky is the noise factor, supplied by the caller (the class stores no row covariance).
- __init__(M, V_inv, M0=None, V_inv0=None)#