BaseExperiment.build#

BaseExperiment.build()[source]#

Construct the model graph without sampling anything.

Public, idempotent, and auto-called by both sampling verbs, so users never have to call it — but calling it explicitly makes the spec inspectable (pm.model_to_graphviz(exp.model), exp.model.basic_RVs, merged priors) before any compute is spent.

Inputs come from the design matrices prepared at construction, not from recomputing formulas against exp.data. Rebuilding verifies that this frozen design matches the model’s build-time fingerprint; it does not detect edits to exp.data. Construct a new experiment to change the data, or assign a fresh model to revise the model spec.

Returns:

The same experiment, for chaining.

Return type:

Self

Raises:

RuntimeError – If the model was already built with a different design.