ModelAdapter.predict#

abstractmethod ModelAdapter.predict(X, *, out_of_sample=False, **kwargs)[source]#

Return expected outcomes with canonical prediction dimensions.

Every backend returns the same container: response-scale expected outcomes as an xarray.DataArray with dimensions ("chain", "draw", "obs_ind", "treated_units"). Point-estimate backends (sklearn) return singleton chain/draw dimensions — a point estimate is a posterior with one atom.

Parameters:
  • X (Any) – Predictor matrix for which to generate predictions.

  • out_of_sample (bool) – Whether predictions are out-of-sample. Used by PyMC backends only.

  • **kwargs (Any) – Additional keyword arguments forwarded to the underlying model.

Returns:

Expected outcomes with dimensions ("chain", "draw", "obs_ind", "treated_units").

Return type:

xr.DataArray