MeanSegmentEncoderTransform¶
- class MeanSegmentEncoderTransform[source]¶
Bases:
etna.transforms.base.Transform
,etna.transforms.base.FutureMixin
Makes expanding mean target encoding of the segment. Creates column ‘segment_mean’.
- Inherited-members
Methods
fit
(df)Fit encoder.
fit_transform
(df)May be reimplemented.
inverse_transform
(df)Inverse transforms dataframe.
transform
(df)Get encoded values for the segment.
Attributes
idx
- fit(df: pandas.core.frame.DataFrame) etna.transforms.encoders.mean_segment_encoder.MeanSegmentEncoderTransform [source]¶
Fit encoder.
- Parameters
df (pandas.core.frame.DataFrame) – dataframe with data to fit expanding mean target encoder.
- Returns
Fitted transform
- Return type
etna.transforms.encoders.mean_segment_encoder.MeanSegmentEncoderTransform