PyMCModelAdapter.predict#
- PyMCModelAdapter.predict(X, *, coords=None, out_of_sample=False, group='posterior')[source]#
Predict expected outcomes using the PyMC model.
- Parameters:
X (
Any) – Predictor matrix for which to generate predictions.coords (
dict[str,Any] |None) – Coordinate metadata for the PyMC model.out_of_sample (
bool) – Whether predictions are out-of-sample.group (
Literal['prior','posterior']) – Draw group to condition forward sampling on. The returned draws always land in theposterior_predictivegroup (PyMC’s output location regardless of conditioning group) but carry the conditioning group’schain/drawsizes.
- Returns:
Forward draws of
muwith canonical prediction dimensions.- Return type:
xr.DataArray
Notes
Reading
posterior_predictivehere is correct for prior-conditioned output too; do not “fix” it to readidata[group].