ThetaLinesTransformer
Decompose the original data into two or more Theta-lines.
Implementation of decomposition for Theta-method [1] as described in [2].
Overview: Input univariate series of length “n” and ThetaLinesTransformer modifies the local curvature of the time series using Theta-coefficient values passed through the parameter theta.
Each Theta-coefficient is applied directly to the second differences of the input series. The resulting transformed series (Theta-lines) are returned as a pd.DataFrame of shape len(input series) * len(theta).
Quickstart
from sktime.transformations.theta import ThetaLinesTransformer
estimator = ThetaLinesTransformer(theta=(0, 2))Tags
Capabilities
- Unequal-length series
- Multivariate: Not supported
- Inverse transform: Not supported
- Missing values: Not supported
- Removes missing values: Not supported
- Equalizes series length: Not supported
Properties
- Input typescitype:transform-input
- Series
- Output typescitype:transform-output
- Series
- Label typescitype:transform-labels
- None
- Fit is emptyfit_is_empty
- Yes
- Keeps the time indextransform-returns-same-time-index
- Yes
- Requires Xrequires_X
- Yes
- Requires yrequires_y
- No
- X and y need the same indexX-y-must-have-same-index
- No
Parameters(1)
- thetasequence of float, default=(0,2)
- Theta-coefficients to use in transformation.
Examples
>>> from sktime.transformations.theta import ThetaLinesTransformer
>>> from sktime.datasets import load_airline
>>> y = load_airline ()
>>> transformer = ThetaLinesTransformer ([0, 0.25, 0.5, 0.75 ])
>>> y_thetas = transformer. fit_transform (y)References
V.Assimakopoulos et al., “The theta model: a decomposition approach to forecasting”, International Journal of Forecasting, vol. 16, pp. 521-530, 2000.
E.Spiliotis et al., “Generalizing the Theta method for automatic forecasting “, European Journal of Operational Research, vol. 284, pp. 550-558, 2020.