Transformer
ConditionalDeseasonalizer
Inverse TransformationReihen ungleicher Länge
Remove seasonal components from time series, conditional on seasonality test.
Fit tests for seasonality and if the passed time series has a seasonal component it applies seasonal decomposition provided by statsmodels to compute the seasonal component. If the test is negative seasonal_ is set to all ones (if model is “multiplicative”) or to all zeros (if model is “additive”).
Transform aligns seasonal components stored in seasonal_ with the time index of the passed series and then subtracts them (“additive” model) from the passed series or divides the passed series by them (“multiplicative” model).
Schnellstart
python
from sktime.transformations.detrend import ConditionalDeseasonalizer
estimator = ConditionalDeseasonalizer(seasonality_test=None, sp=1, model='additive')Tags
Fähigkeiten
- Inverse Transformation: Unterstützt
- Reihen ungleicher Länge
- Multivariat: Nicht unterstützt
- Fehlende Werte: Nicht unterstützt
- Entfernt fehlende Werte: Nicht unterstützt
- Gleicht Reihenlängen an: Nicht unterstützt
Eigenschaften
- Eingabetypscitype:transform-input
- Series
- Ausgabetypscitype:transform-output
- Series
- Label-Typscitype:transform-labels
- None
- Fit ist leerfit_is_empty
- Nein
- Behält den Zeitindextransform-returns-same-time-index
- Ja
- Benötigt Xrequires_X
- Ja
- Benötigt yrequires_y
- Nein
- X und y brauchen denselben IndexX-y-must-have-same-index
- Nein
Parameter(3)
- seasonality_testcallable or None, default=None
- Callable that tests for seasonality and returns True when data is seasonal and False otherwise. If None, 90% autocorrelation seasonality test is used.
- spint, default=1
- Seasonal periodicity.
- model{“additive”, “multiplicative”}, default=”additive”
- Model to use for estimating seasonal component.
Beispiele
>>> from sktime.transformations.detrend import ConditionalDeseasonalizer
>>> from sktime.datasets import load_airline
>>> y = load_airline ()
>>> transformer = ConditionalDeseasonalizer (sp = 12)
>>> y_hat = transformer. fit_transform (y)