Skip to content

innovate.sarima_fit

All current Python definitions

View source · Source file SHA-256: 522871fe0b61b840b5f85b8f278beb2b79c7afd68645265ae3a68983d56d74e4

def sarima_fit(
data: pl.Series,
*,
order: tuple[int, int, int],
seasonal_order: tuple[int, int, int, int] = (0, 0, 0, 0),
historical: bool = False,
) -> pl.Series: ...

Fit a no-intercept native SARIMA model and return in-sample predictions.

The caller supplies evenly spaced, ordered samples; timestamps are not available to this wrapper. This function returns fitted values only, not coefficient estimates, future forecasts or prediction intervals.

  • data: Finite numeric Polars Series without nulls, in observation order.
  • order: Nonnegative ordinary (p, d, q) autoregressive, differencing and moving-average orders, subject to native order and sample-size bounds.
  • seasonal_order: Nonnegative (P, D, Q, period) seasonal orders; defaults to (0, 0, 0, 0). Seasonal differencing needs a period of at least two.
  • historical: Include historical diffuse-initialization predictions when applicable. Defaults to False, which leaves differencing warmup positions null in the returned series.

Float64 Series with the input name and length, aligned to the original samples. Initial nulls reflect differencing warmup outside historical mode.

  • NativeError: If orders, sample counts, stationarity constraints or native estimation cannot satisfy the supported SARIMA contract.
  • ValueError: If serialization encounters non-finite values.
  • TypeError: If data or order values are not JSON-compatible.
  • polars.exceptions.PolarsError: If fitted output cannot form a numeric series.