PartialAutoCorrelationTransformer
Partial auto-correlation transformer.
The partial autocorrelation function measures the conditional correlation between a timeseries and its self at different lags. In particular, the correlation between a time period and a lag, is calculated conditional on all the points between the time period and the lag.
The PartialAutoCorrelationTransformer returns these values as a series for each lag up to the n_lags specified.
Schnellstart
from sktime.transformations.acf import PartialAutoCorrelationTransformer
estimator = PartialAutoCorrelationTransformer(n_lags=None, method='ywadjusted')Tags
Fähigkeiten
- Reihen ungleicher Länge
- Multivariat: Nicht unterstützt
- Inverse Transformation: 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
- Ja
- Behält den Zeitindextransform-returns-same-time-index
- Nein
- Benötigt Xrequires_X
- Ja
- Benötigt yrequires_y
- Nein
- X und y brauchen denselben IndexX-y-must-have-same-index
- Nein
Parameter(2)
- n_lagsint, default=None
- Number of lags to return partial autocorrelation for. If None, statsmodels acf function uses min(10 * np.log10(nobs), nobs // 2 - 1).
- methodstr, default=”ywadjusted”
Specifies which method for the calculations to use.
“yw” or “ywadjusted”: Yule-Walker with sample-size adjustment in denominator for acovf. Default.
“ywm” or “ywmle”: Yule-Walker without adjustment.
“ols”: regression of time series on lags of it and on constant.
“ols-inefficient”: regression of time series on lags using a single common sample to estimate all pacf coefficients.
“ols-adjusted”: regression of time series on lags with a bias adjustment.
“ld” or “ldadjusted”: Levinson-Durbin recursion with bias correction.
“ldb” or “ldbiased”: Levinson-Durbin recursion without bias correction.
Beispiele
>>> from sktime.transformations.acf import PartialAutoCorrelationTransformer
>>> from sktime.datasets import load_airline
>>> y = load_airline ()
>>> transformer = PartialAutoCorrelationTransformer (n_lags = 12)
>>> y_hat = transformer. fit_transform (y)