bayesmithDocumentation0.10.0 source

Evidence and model comparison

Evidence integrates a normalized model over its entire prior. Constants and prior mass that can disappear from a posterior ratio remain essential here.

Z=p(\mathbf y\mid M)=\int p(\mathbf y\mid\theta,M)\,p(\theta\mid M)\,\mathrm d\theta

The implemented route

EvidenceTask currently executes a whole-graph-exact linear-Gaussian problem. The answer is an EvidenceResult with log_evidence, separately derived exact components, run provenance and normalization references. The evidence section in five_tasks.py is a runnable example.

Enable x64 before starting JAX. A Gaussian conditional block is insufficient: all remaining integration must be resolved analytically for this public execution route.

Evidence requirements

Failed premiseMeaning
evidence_prior_properThe declared prior has infinite total mass.
evidence_prior_normalisedA finite prior mass is not the required unit mass.
evidence_prior_undeclaredThe graph does not supply the required declared prior information.
evidence_requires_x64The current process precision is inadequate for this route.
Residual integral / backend refusalThe graph requires numerical residual integration beyond the available public execution route.

The same graph can still admit posterior inference. Compilation is task-specific because posterior sampling and normalized evidence have different prerequisites.

Residual numerical evidence

A compiled residual problem and backend adapter code exist. Public residual EvidenceTask execution remains disabled. Installing JAXNS or BlackJAX alone does not complete the route, repetition checks, uncertainty calibration or Result assembly.

Do not report a raw importance ratio, optimizer objective or backend scalar as a certified EvidenceResult. Experimental estimates require their own declared normalization and uncertainty assumptions.

Compare like with like

A Bayes factor compares evidences for the same data interpretation, observation measure and explicit prior choices. Different masks, normalizations or conditioning can make a numerical subtraction meaningless. Carry model and data fingerprints alongside each log evidence and inspect comparability before subtracting.

Reference: EvidenceTask, EvidenceResult. The old bayesmith.evidence namespace is a deprecated alias of marginal-likelihood utilities; new task-level evidence must not reuse it.

Type a concept or API name.