Forecaster
StatsForecastMSTL
Categorical in XInsample
StatsForecast Multiple Seasonal-Trend decomposition using LOESS model.
Quickstart
python
from sktime.forecasting.statsforecast import StatsForecastMSTL
estimator = StatsForecastMSTL(season_length: int | list [int ], trend_forecaster=None, stl_kwargs: dict | None=None, pred_int_kwargs: dict | None=None)Parameters(4)
- season_lengthUnion[int, List[int]]
- Number of observations per unit of time. For multiple seasonalities use a list.
- trend_forecasterestimator, optional, default=StatsForecastAutoETS()
- Sktime estimator used to make univariate forecasts. Multivariate estimators are not supported.
- stl_kwargsdict, optional
Extra arguments to pass to [
statsmodels.tsa.seasonal.STL](https://www.statsmodels.org/dev/generated/statsmodels.tsa.seasonal.STL.html#statsmodels.tsa.seasonal.STL). The
periodandseasonalarguments are reserved.- pred_int_kwargsdict, optional
Extra arguments to pass to [
statsforecast.utils.ConformalIntervals].
Examples
>>> from sktime.datasets import load_airline
>>> from sktime.forecasting.statsforecast import StatsForecastMSTL
>>> y = load_airline ()
>>> model = StatsForecastMSTL (season_length = [3, 12 ])
>>> fitted_model = model. fit (y = y)
>>> y_pred = fitted_model. predict (fh = [1, 2, 3 ])References
- [1 ] https://nixtla.github.io/statsforecast/src/core/models.html#mstl