PyMCForecastModel.fit#

PyMCForecastModel.fit(X, y, coords=None)[source]#

Construct and fit the forecasting model on the pre-period.

Parameters:
  • X (DataArray) – Design matrix with dims ["obs_ind", "coeffs"] whose obs_ind coordinate carries the real (datetime or numeric) index. Columns are passed to pymc_forecast as covariates; a zero-column design (formula "y ~ 0") fits a covariate-free model.

  • y (DataArray) – Outcome with dims ["obs_ind", "treated_units"]. Must contain exactly one treated unit.

  • coords (dict[str, Any] | None) – Ignored; the real coordinates are read from X and y.

Return type:

InferenceData