mixle.epistemic.likelihood module

Pluggable reweighting strategies, at a declared verifiability tier.

Names the program plan’s “in order of preference: (1) certified simulator likelihoods; (2) epistemic synthesis + discrepancy; (3) amortized neural estimator” list as a typed seam (LikelihoodStrategy) so mixle.epistemic.portfolio.HypothesisPortfolio.reweight() doesn’t care which one produced a number, and so a real simulator integration (explicitly out of scope for this plan – see notes/epistemic-loop-integration-workplan.md §6) has a documented interface to implement against today. tier reuses mixle.doe.oracle.VERIFIABILITY_TIERS verbatim rather than inventing a second vocabulary – the same tiers mixle.substrate.belief’s evidence entries already use.

class LikelihoodStrategy(*args, **kwargs)[source]

Bases: Protocol

A (hypothesis, observation) -> likelihood callable that declares its verifiability tier.

class DiscrepancyLikelihood(predict_fn, *, tier, temperature=1.0)[source]

Bases: object

Likelihood from mixle.epistemic.discrepancy.discrepancy_report(): exp(-discrepancy / temperature).

predict_fn(hypothesis) -> predicted_observation is the hypothesis’s epistemic-synthesis step (program plan §3.7’s “for each live hypothesis, generate the observation you would expect to see”); this class only does the comparison, not the prediction. tier is a required constructor argument rather than something inferred from discrepancy_report’s degraded flag, because whether predict_fn itself calls a certified simulator under the hood is invisible to the discrepancy computation – inferring it here would risk silently misreporting a tier (notes/epistemic-loop-integration-workplan.md §5 Q2).

Parameters:
  • predict_fn (Callable[[Hypothesis], Any])

  • tier (str)

  • temperature (float)

class CallableLikelihood(fn, *, tier)[source]

Bases: object

Wrap any plain fn(hypothesis, observation) -> float as a LikelihoodStrategy.

Parameters:
  • fn (Callable[[Hypothesis, Any], float])

  • tier (str)