_OneSegmentTrendTransform¶
- class _OneSegmentTrendTransform(in_column: str, out_column: str, change_point_model: ruptures.base.BaseEstimator, detrend_model: Type[sklearn.base.RegressorMixin], **change_point_model_predict_params)[source]¶
Bases:
etna.transforms.decomposition.change_points_trend._OneSegmentChangePointsTrendTransform
_OneSegmentTrendTransform adds trend as a feature.
Init _OneSegmentTrendTransform.
- Parameters
in_column (str) – name of column to apply transform to
out_column (str) – name of added column
change_point_model (ruptures.base.BaseEstimator) – model to get trend change points
detrend_model (Type[sklearn.base.RegressorMixin]) – model to get trend from data
change_point_model_predict_params – params for
change_point_model.predict
method
- Inherited-members
Methods
fit
(df)Fit OneSegmentChangePointsTransform: find trend change points in
df
, fit detrend models with data from intervals of stable trend.fit_transform
(df)May be reimplemented.
Inverse transform dataframe.
transform
(df)Add column with trend, got from the detrend_model.