BaseFeatureSelectionTransform

class BaseFeatureSelectionTransform(features_to_use: Union[List[str], Literal['all']] = 'all')[source]

Bases: etna.transforms.base.Transform, abc.ABC

Base class for feature selection transforms.

Inherited-members

Parameters

features_to_use (Union[List[str], Literal['all']]) –

Methods

fit(df)

Fit feature model.

fit_transform(df)

May be reimplemented.

inverse_transform(df)

Inverse transforms dataframe.

transform(df)

Select top_k features.

transform(df: pandas.core.frame.DataFrame) pandas.core.frame.DataFrame[source]

Select top_k features.

Parameters

df (pandas.core.frame.DataFrame) – dataframe with all segments data

Returns

result – Dataframe with with only selected features

Return type

pd.DataFrame