MultivarLinearReg.predict#
- MultivarLinearReg.predict(X, coords=None, out_of_sample=False, **kwargs)[source]#
Predict data given input data X.
Overrides the base implementation to reshape
y_hatin the returned posterior predictive: the model uses a flattened likelihood (MvNormal on shape(n_obs * n_units, n_outcomes)), so PyMC storesy_hatwith that shape. We reshape it back to(obs_ind, treated_units, outcomes)so that the returned InferenceData matches the interface expected bycalculate_impact()and ITS (3Dy_hatwith the same dims as other models).Caution
Results in KeyError if model hasn’t been fit.