You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The last two statistical legs from the #1332 audit, now that F1-F5/F7a/F7c/F8/F10 have landed (#1345/#1348/#1334/#1349/#1351):
F6 — TruncatedNormalMessage.kl uses the untruncated Gaussian formula; the error grows as posterior mass approaches the bounds. Live in HowToFit ch3 tutorial 5's EP convergence metric (af.TruncatedGaussianPrior). Fix: compute KL from truncated moments (mean/variance of the truncated normal via the standard hazard-function expressions), with the exact same-support case first and a documented approximation policy for mismatched supports.
F7(b) — MeanField.from_priors (the projection behind every search-driven factor update) constructs with log_norm = 0, so the sampler's per-factor evidence never enters the mean field and EPMeanField.log_evidence cannot be trusted for model comparison in sampler-driven fits. Design decision + implementation: record the search's log-evidence in the projected mean field's log_norm (recommendation to be posted after code inspection; README §5 documents the intended evidence algebra).
Validation: full suite; MC-vs-analytic KL tests for the truncated family (extending the #1351 direction property test); an evidence round-trip test (EP log_evidence vs analytic on the exact-conjugate toy); EP integration smoke (parity/deterministic/exact).
Autonomy: supervised (--auto chain, human directed 2026-07-10). Suggested branch feature/ep-statistics-completion.
Overview
The last two statistical legs from the #1332 audit, now that F1-F5/F7a/F7c/F8/F10 have landed (#1345/#1348/#1334/#1349/#1351):
TruncatedNormalMessage.kluses the untruncated Gaussian formula; the error grows as posterior mass approaches the bounds. Live in HowToFit ch3 tutorial 5's EP convergence metric (af.TruncatedGaussianPrior). Fix: compute KL from truncated moments (mean/variance of the truncated normal via the standard hazard-function expressions), with the exact same-support case first and a documented approximation policy for mismatched supports.MeanField.from_priors(the projection behind every search-driven factor update) constructs withlog_norm = 0, so the sampler's per-factor evidence never enters the mean field andEPMeanField.log_evidencecannot be trusted for model comparison in sampler-driven fits. Design decision + implementation: record the search's log-evidence in the projected mean field'slog_norm(recommendation to be posted after code inspection; README §5 documents the intended evidence algebra).Validation: full suite; MC-vs-analytic KL tests for the truncated family (extending the #1351 direction property test); an evidence round-trip test (EP log_evidence vs analytic on the exact-conjugate toy); EP integration smoke (parity/deterministic/exact).
Autonomy: supervised (--auto chain, human directed 2026-07-10). Suggested branch
feature/ep-statistics-completion.