Expand description
Seasonal-Trend decomposition using Loess (STL).
Splits a time series into trend, seasonal, and residual
components: y = trend + seasonal + residual.
The implementation follows the Cleveland et al. (1990) STL algorithm:
- Start with
seasonal = 0. - Detrend:
detrended = y - trend. - Subseries smoothing: extract each season’s slice, apply degree-1 Loess (locally weighted polynomial regression with tricube kernel).
- Trend update:
y - seasonal, then Loess withtrend_window. - Repeat for
n_iteriterations.
Structs§
- Decomposition
- Decomposition result:
y[i] = trend[i] + seasonal[i] + residual[i]. - StlConfig
- Configuration for the STL decomposer.
- StlDecomposer
- STL decomposer implementing
SeasonalDecomposer.
Enums§
- Decomposition
Error - Errors that can occur during decomposition.
Traits§
- Seasonal
Decomposer - Trait for seasonal decomposition strategies.
Functions§
- detect_
period - Detect the dominant period using autocorrelation peak finding.
- detect_
period_ with_ threshold - Detect the dominant period using autocorrelation peak finding with a caller-specified minimum ACF threshold.
- stl_
decompose - Perform STL decomposition.