WindowStatisticsTransform¶
- class WindowStatisticsTransform(in_column: str, out_column: str, window: int, seasonality: int = 1, min_periods: int = 1, fillna: float = 0, **kwargs)[source]¶
Bases:
etna.transforms.base.Transform
,abc.ABC
WindowStatisticsTransform handles computation of statistical features on windows.
Init WindowStatisticsTransform.
- Parameters
in_column (str) – name of processed column
out_column (str) – result column name
window (int) – size of window to aggregate, if -1 is set all history is used
seasonality (int) – seasonality of lags to compute window’s aggregation with
min_periods (int) – min number of targets in window to compute aggregation; if there is less than
min_periods
number of targets return Nonefillna (float) – value to fill results NaNs with
- Inherited-members
Methods
fit
(*args)Fits transform.
fit_transform
(df)May be reimplemented.
inverse_transform
(df)Inverse transforms dataframe.
transform
(df)Compute feature's value.
- fit(*args) etna.transforms.math.statistics.WindowStatisticsTransform [source]¶
Fits transform.