Back to models
Forecaster

ThetaForecaster

Categorical in XInsamplePred intPred int insample

Theta method for forecasting.

Quickstart

python
from sktime.forecasting.theta import ThetaForecaster

estimator = ThetaForecaster(initial_level=None, deseasonalize=True, sp=1, deseasonalize_model='multiplicative')

Parameters(4)

initial_levelfloat, optional
The alpha value of the simple exponential smoothing, if the value is set then this will be used, otherwise it will be estimated from the data.
deseasonalizebool, optional (default=True), or sktime BaseTransformer instance

Whether and how to deseasonalize the data before fitting the theta model.

  • If True, data is seasonally adjusted using sktime Deseasonalizer().

  • If BaseTransformer instance, this is used to seasonally adjust the data, via fit_transform in fit, and inverse_transform in predict.

  • If False, no seasonal adjustment is done.

spint, optional (default=1)
The number of observations that constitute a seasonal period for a multiplicative deseasonaliser, which is used if seasonality is detected in the training data. Ignored if a deseasonaliser transformer is provided. Default is 1 (no seasonality).
deseasonalize_modelstr, optional (default=”multiplicative”)

The type of seasonal decomposition to use in the deseasonaliser. Can be “additive” or “multiplicative”. Passed on to Deseasonalizer if deseasonalize=True. Only used if deseasonalize=True.

Examples

>>> from sktime.datasets import load_airline
>>> from sktime.forecasting.theta import ThetaForecaster
>>> y = load_airline ()
>>> forecaster = ThetaForecaster (sp = 12)
>>> forecaster. fit (y) ThetaForecaster(
... )
>>> y_pred = forecaster. predict (fh = [1, 2, 3 ])

References

  1. [1 ] Assimakopoulos, V. and Nikolopoulos, K. The theta model: a decomposition approach to forecasting. International Journal of Forecasting 16, 521-530, 2000. https://www.sciencedirect.com/science/article/pii/S0169207000000662 [2 ] ` Hyndman, Rob J., and Billah, Baki. Unmasking the Theta method. International J. Forecasting, 19, 287-290, 2003. https://www.sciencedirect.com/science/article/pii/S0169207001001431