mixle.ppl.provenance module

Reproducible artifacts for the PPL surface: a provenance header for a fitted RandomVariable.

The estimator path has mixle.inference.fit_with_provenance(); this is its PPL counterpart. It times a rv.fit(...) (any how – EM / MAP / MCMC / VI / …), then builds a Header from the fitted model’s lowered distribution (rv.dist), so the header gets a real schema and final log-likelihood alongside the data hash, training settings, timing, resources, and environment. The header is returned (and attached as rv.header when the RV permits attribute setting).

fit_with_provenance(rv, data, *, seed=None, **fit_kw)[source]

Fit a PPL RandomVariable on data and return (fitted_rv, header) with full provenance.

fit_kw is passed through to rv.fit (how=, max_its=, delta=, backend=, …). The header is built from the fitted model’s lowered distribution so it carries schema + final log-likelihood where available; method records the requested how. The header is returned regardless; it is also attached as fitted.header when the RandomVariable allows it (RVs with __slots__ do not).

Parameters: