Overview
Phase 5 of the EP framework review (umbrella: PyAutoMind/research/graphical_ep/ep_framework_review.md). PyAutoFit has three ways to express deterministic relations between model quantities, and they do not share machinery:
- Graph-level deterministic variables —
Factor(..., factor_out=v), propagated via FactorValue.deterministic_values, with dedicated quasi-Newton curvature transfer in the Laplace path. Exercised (as of Phase 3) by unit tests and the new autofit_workspace_test/scripts/graphical/ep_deterministic.py, but by no known real use case.
- Compound prior arithmetic (
autofit/mapper/prior/arithmetic/) — model-space composition (prior_a * x + prior_b), added by rhayes777 (PR to be located as part of this phase).
- Free shared variables — share a prior across factors and encode the relation inside the likelihood (the IC50 cancer pattern:
latents @ coef_matrix + coef_mean computed in log_likelihood_function).
Task (i)-(iv) of the original review asked: should anything be done about the low-level deterministic_variable API going unused by the real use cases? Output: a recommendation (unify / document both / deprecate one) with a migration-cost estimate, posted here for human decision.
Autonomy: --auto, effective supervised (research cap). Read-only investigation — no source edits; parks at the decision.
Plan
- Locate the rhayes777 PR(s) that introduced compound prior arithmetic and any EP-side deterministic composition; reconstruct the intended design from the PR discussion.
- Census each mechanism: implementation surface, EP interaction (does it create graph variables? messages? evidence contributions?), current users (source, tests, workspaces, HowToFit, IC50, cosmology), statistical semantics (is uncertainty propagated exactly, approximately, or not at all?).
- Analyse the gaps: what each mechanism can express that the others cannot; where a user would be silently wrong choosing one over another.
- Recommendation + migration cost estimate, posted as the phase verdict; decision (human) then feeds the fix/feature queue and Phase 2 docs get the outcome.
Overview
Phase 5 of the EP framework review (umbrella:
PyAutoMind/research/graphical_ep/ep_framework_review.md). PyAutoFit has three ways to express deterministic relations between model quantities, and they do not share machinery:Factor(..., factor_out=v), propagated viaFactorValue.deterministic_values, with dedicated quasi-Newton curvature transfer in the Laplace path. Exercised (as of Phase 3) by unit tests and the newautofit_workspace_test/scripts/graphical/ep_deterministic.py, but by no known real use case.autofit/mapper/prior/arithmetic/) — model-space composition (prior_a * x + prior_b), added by rhayes777 (PR to be located as part of this phase).latents @ coef_matrix + coef_meancomputed inlog_likelihood_function).Task (i)-(iv) of the original review asked: should anything be done about the low-level
deterministic_variableAPI going unused by the real use cases? Output: a recommendation (unify / document both / deprecate one) with a migration-cost estimate, posted here for human decision.Autonomy:
--auto, effectivesupervised(research cap). Read-only investigation — no source edits; parks at the decision.Plan