incline.stl_decompose

incline.stl_decompose(df, column_value='value', time_column=None, period=None, seasonal=7, trend=None, robust=True)[source]

Seasonal-trend decomposition by LOESS.

Falls back to moving_average_decompose() when the period is unusable or STL raises. The fallback returns the same schema, so callers never have to ask which route ran.

Parameters:
  • df (DataFrame) – Time series data.

  • column_value (str) – Column holding the values.

  • time_column (str | None) – Unused; kept for signature symmetry.

  • period (int | None) – Cycle length. Detected when None.

  • seasonal (int) – Length of the seasonal smoother; forced odd.

  • trend (int | None) – Length of the trend smoother; derived when None.

  • robust (bool) – Downweight outliers.

Returns:

The frame plus DECOMPOSITION_COLUMNS.

Return type:

DataFrame