etna icon indicating copy to clipboard operation
etna copied to clipboard

Add `in_column` attribute to all the transforms

Open alex-hse-repository opened this issue 2 years ago • 0 comments

🚀 Feature Request

Add in_column attribute to all the transforms, if there is no such attribute yet. This attribute will be used by the transform to get only the necessary columns from the dataset.

Proposal

  1. Inspect the current transforms and make sure that all of them has attribute in_column: Union[str, List[str], Literal["all"]]
  2. For transforms from timestamp folder create dummy in_column with default value "target"
  3. For FilterFeaturesTransform create appropriate in_column base on include/exclude
  • If include is not None in_column="all"
  • If exclude is not None use in_column=exclude + "target"
  1. For feature selection transform create in_column based on features_to_use attribute
  2. For segment encoders create in_column with value "target"
  3. For nn set in_columns to literal "all"

For the transforms with the constant in_column make in the class attribute, do not initialize it in the constructor

Test cases

Create test, then check that in_column value is generated correctly for transforms from feature_selection folder

Additional context

No response

alex-hse-repository avatar Jul 21 '22 13:07 alex-hse-repository