MeanTransform¶
- class MeanTransform(in_column: str, window: int, seasonality: int = 1, alpha: float = 1, min_periods: int = 1, fillna: float = 0, out_column: Optional[str] = None)[source]¶
Bases:
etna.transforms.math.statistics.WindowStatisticsTransform
MeanTransform computes average value for given window.
\[MeanTransform(x_t) = \sum_{i=1}^{window}{x_{t - i}\cdot\alpha^{i - 1}}\]Init MeanTransform.
- Parameters
in_column (str) – name of processed column
window (int) – size of window to aggregate
seasonality (int) – seasonality of lags to compute window’s aggregation with
alpha (float) – autoregressive coefficient
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
out_column (str, optional) – result column name. If not given use
self.__repr__()
- 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.