Overview
Phase 3 of the EP framework review (umbrella: PyAutoMind/research/graphical_ep/ep_framework_review.md; audit PyAutoFit#1332; formal spec PyAutoFit#1334). End-to-end examples and thicker integration coverage for the EP framework.
Autonomy: --auto, effective level supervised; plan approved by user in-session at launch. No Heart acknowledgement given at launch. Run parks at ship sign-off.
Plan (approved)
autofit_workspace (branch feature/ep-examples-tests):
- New
scripts/features/expectation_propagation.py — step-by-step low-level EP walkthrough in the likelihood_function.py mould: simulate 3 shared-centre 1D Gaussians, build the factor graph explicitly, construct the EPMeanField, dissect one EP update cell-by-cell (cavity messages/natural parameters → tilted fit via LaplaceOptimiser → moment-matched projection → damped division → before/after message comparison → per-variable KL → evidence pieces), then the full EPOptimiser loop and the convergence/damping knobs. Each step quotes the governing equation from autofit/graphical/README.md (PyAutoFit#1334).
- Cross-reference from
scripts/features/graphical_models.py's closing EP section.
autofit_workspace_test (same branch):
scripts/graphical/ep_parity.py — EP vs joint-fit parity on the shared-centre toy (shared-parameter posterior mean/σ within tolerance; truth within 3σ).
scripts/graphical/ep_deterministic.py — low-level factor_out deterministic-variable API through an EP fit (Phase 5 groundwork).
scripts/graphical/ep_exact.py — ExactFactorFit conjugate path: analytic update == moment-matched sampled result.
- Fast settings throughout; not added to
smoke_tests.txt.
Ship via ship_workspace; no library-first gate (exercises released EP APIs only; PyAutoFit#1334 is docs-only).
Overview
Phase 3 of the EP framework review (umbrella:
PyAutoMind/research/graphical_ep/ep_framework_review.md; audit PyAutoFit#1332; formal spec PyAutoFit#1334). End-to-end examples and thicker integration coverage for the EP framework.Autonomy:
--auto, effective levelsupervised; plan approved by user in-session at launch. No Heart acknowledgement given at launch. Run parks at ship sign-off.Plan (approved)
autofit_workspace (branch
feature/ep-examples-tests):scripts/features/expectation_propagation.py— step-by-step low-level EP walkthrough in thelikelihood_function.pymould: simulate 3 shared-centre 1D Gaussians, build the factor graph explicitly, construct theEPMeanField, dissect one EP update cell-by-cell (cavity messages/natural parameters → tilted fit viaLaplaceOptimiser→ moment-matched projection → damped division → before/after message comparison → per-variable KL → evidence pieces), then the fullEPOptimiserloop and the convergence/damping knobs. Each step quotes the governing equation fromautofit/graphical/README.md(PyAutoFit#1334).scripts/features/graphical_models.py's closing EP section.autofit_workspace_test (same branch):
scripts/graphical/ep_parity.py— EP vs joint-fit parity on the shared-centre toy (shared-parameter posterior mean/σ within tolerance; truth within 3σ).scripts/graphical/ep_deterministic.py— low-levelfactor_outdeterministic-variable API through an EP fit (Phase 5 groundwork).scripts/graphical/ep_exact.py—ExactFactorFitconjugate path: analytic update == moment-matched sampled result.smoke_tests.txt.Ship via
ship_workspace; no library-first gate (exercises released EP APIs only; PyAutoFit#1334 is docs-only).