MMM.build_from_idata#
- MMM.build_from_idata(idata)[source]#
Rebuild the model from an
InferenceData
object.Uses the stored fit dataset in
idata
to reconstruct the model graph by callingbuild_model()
. This is commonly used as part of aload
workflow to restore a model prior to sampling predictive quantities.- Parameters:
- idata
az.InferenceData
Inference data containing the fit dataset under the
fit_data
group.
- idata
- Returns:
Notes
- Expects
idata.fit_data
to exist and contain both features and the target column named
self.output_var
.
- Expects
- This rebuilds the model structure; it does not attach posterior samples.
Assign
self.idata = idata
separately if you need to reuse samples.
Examples
>>> mmm.build_from_idata(idata)