condition_mixture

condition_mixture#

hybrid_aif.inference.condition_mixture(m, H, c, R_chol, y)[source]#

Exact Bayesian update of m on y = H x + c + eps, eps ~ N(0, RR^T).

Returns (posterior, log_evidence): the K-component mixture of per-component Kalman posteriors with log-weights log w_j + log N(y; H mu_j + c, H Sigma_j H^T + R), renormalized, and the exact log p(y) = log sum_j w_j N(y; H mu_j + c, S_j). Prior weights are normalized first, so log_evidence is gauge-free; dead (-inf) components contribute nothing, so both outputs are invariant to zero-weight padding. Batch axes broadcast per the distribution contract.