FilterFeaturesTransform¶
- class FilterFeaturesTransform(include: Optional[Sequence[str]] = None, exclude: Optional[Sequence[str]] = None)[source]¶
Bases:
etna.transforms.base.Transform
Filters features in each segment of the dataframe.
Create instance of FilterFeaturesTransform.
- Parameters
include (Optional[Sequence[str]]) – list of columns to pass through filter
exclude (Optional[Sequence[str]]) – list of columns to not pass through
- Raises
ValueError: – if both options set or non of them
- Inherited-members
Methods
fit
(df)Fit method does nothing and is kept for compatibility.
fit_transform
(df)May be reimplemented.
inverse_transform
(df)Inverse transforms dataframe.
transform
(df)Filter features according to include/exclude parameters.
- fit(df: pandas.core.frame.DataFrame) etna.transforms.feature_selection.filter.FilterFeaturesTransform [source]¶
Fit method does nothing and is kept for compatibility.
- Parameters
df (pandas.core.frame.DataFrame) – dataframe with data.
- Returns
result
- Return type