SpecialDaysTransform¶
- class SpecialDaysTransform(find_special_weekday: bool = True, find_special_month_day: bool = True)[source]¶
Bases:
etna.transforms.base.PerSegmentWrapper
,etna.transforms.base.FutureMixin
SpecialDaysTransform generates series that indicates is weekday/monthday is special in given dataframe.
Creates columns ‘anomaly_weekdays’ and ‘anomaly_monthdays’.
Warning
This transform can suffer from look-ahead bias. For transforming data at some timestamp it uses information from the whole train part.
Create instance of SpecialDaysTransform.
- Parameters
find_special_weekday (bool) – flag, if True, find special weekdays in transform
find_special_month_day (bool) – flag, if True, find special monthdays in transform
- Raises
ValueError: – if all the modes are False
- Inherited-members
Methods
fit
(df)Fit transform on each segment.
fit_transform
(df)May be reimplemented.
inverse_transform
(df)Apply inverse_transform to each segment.
transform
(df)Apply transform to each segment separately.