InversePropensityWeighting.build#
- InversePropensityWeighting.build()#
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.The inputs are recomputed from the experiment’s data on every call: for an already-built graph they are verified against the build-time fingerprint, so mutating
exp.dataand rebuilding raisesRuntimeErrorinstead of silently keeping a stale graph. The documented reset path is assigning a fresh model instance.- Returns:
The same experiment, for chaining.
- Return type:
Self
- Raises:
RuntimeError – If the graph exists and the experiment’s data changed since it was built.