PyMCForecastModel.predict#
- PyMCForecastModel.predict(X, coords=None, out_of_sample=False, **kwargs)[source]#
Predict in-sample (pre-period) or forecast the counterfactual.
- Parameters:
X (
DataArray) – Design matrix with dims["obs_ind", "coeffs"]. In-sample prediction replays the training window (Xsupplies only the output coordinates); out-of-sample prediction conditions the forecast onX’s columns as future covariates (or, for a covariate-free model, forecasts overX’sobs_indindex).coords (
dict[str,Any] |None) – Not used, kept for API compatibility.out_of_sample (
bool|None) –Truedraws the post-period counterfactual (“as if untreated”).**kwargs (
Any) – Reserved for forward-compatibility; not consumed.
- Returns:
With a
posterior_predictivegroup holding draw-levelmu(the noise-free latent predictor) andy_hat(the posterior predictive of the observed variable) with dims(chain, draw, obs_ind, treated_units).- Return type:
az.InferenceData