fpi

Contents

fpi#

hybrid_aif.inference.fpi(log_likelihoods, A_deps, priors, observations, num_iters=16, masks=None)[source]#

Mean-field posteriors over state factors given one observation per modality.

fpi_support() is the same sweep, also returning the per-factor unsupported flags. Every log term is clipped at LOG_ZERO on the way in, so -inf entries are legal and an observation no state can explain gives a finite posterior rather than NaN. The returned logits are unnormalised (messages plus log prior).

masks, one entry per modality, marks which observations are present; a masked-out modality contributes the zero message. A Python False skips the modality statically and never reads its observation (which may be None); a traced flag selects at run time, so padding of the right shape must be there.

Design: docs/design/zero-support-evidence.md Z4