hyperiax.prebuilt.bffg.discrete_bf_sweep¶
- hyperiax.prebuilt.bffg.discrete_bf_sweep(prxy_scale_fn, prxy_shift_fn, prxy_covar_fn)[source]¶
Build the discrete-edge backward-filtering up-sweep (Theorem 14 §6.1).
At each non-leaf parent, pulls each child’s canonical message back through the linear-Gaussian auxiliary \(\tilde P(x, dy) = \mathcal N(y; \Phi x + \beta, Q)\,dy\) and fuses (sums) the contributions. The auxiliary is evaluated per-child at the child’s
anchor.- Parameters:
prxy_scale_fn – Callable
(anchor, params) -> (d, d) arrayreturning the auxiliary scale matrix \(\Phi\).prxy_shift_fn – Callable
(anchor, params) -> (d,) arrayreturning the auxiliary shift vector \(\beta\).prxy_covar_fn – Callable
(anchor, params) -> (d, d) SPD arrayreturning the auxiliary covariance \(Q\).
- Return type:
- Returns:
A
hyperiax.SweepFnthat, when applied to a tree, writes(prec, ptnl, log_norm)at every non-leaf node.
Notes
Linear-Gaussian models (auxiliary equal to truth) ignore
anchor; for nonlinear models, iterate this sweep withdiscrete_refine_anchor()(Algorithm 3 §7.1).