StateSpaceTimeSeries.build#

StateSpaceTimeSeries.build(X=None, y=None, coords=None)[source]#

Construct the state-space graph without sampling.

Merges the effective prior set (defaults -> data-derived -> user) and calls build_model(). Idempotent by skipping when the graph already exists.

Parameters:
  • X (DataArray | None) – Input features with dims [“obs_ind”, “coeffs”]. Columns other than the patsy “Intercept” become exogenous regressors.

  • y (DataArray | None) – Target variable with dims [“obs_ind”, “treated_units”]. Must have datetime coordinates on obs_ind.

  • coords (dict[str, Any] | None) – Can contain “datetime_index” for backwards compatibility.

Raises:

RuntimeError – If the graph exists and the data arrays differ from those it was built with.

Return type:

None