Skip to content

Make feature selection transforms return columns in inverse_transform #688

Closed
1 task
alex-hse-repository opened this issue May 13, 2022 · 0 comments · Fixed by #740
Closed
1 task

Make feature selection transforms return columns in inverse_transform #688

alex-hse-repository opened this issue May 13, 2022 · 0 comments · Fixed by #740
Assignees
Labels
enhancement New feature or request

Comments

@alex-hse-repository
Copy link
Collaborator

alex-hse-repository commented May 13, 2022

🚀 Feature Request

Make feature selection transforms return columns in inverse_transform

Motivation

Inverse transformation might be impossible to the other transforms because of the absence of some columns removed by feature selection

Proposal

  • In BaseFeatureSelectionTransform and FilterFeaturesTransform
  1. In constructor add flag return_features: bool=False
  2. In method transform store the columns that will be remover in self._df_removed(only for return_features=True)
  3. Add method inverse_transform, should return the columns form self._df_removed(only for return_features=True)

Test cases

For both transforms:

  1. Method transform correctly store the data frame with removed columns
  2. Method inverse_transform correctly return the removed columns
  3. Backtest works correctly with pipeline including this transform(e.g transforms=[LogTransform("column_1"), FilterFeaturesTransform(exclude=["column_1"])])
  4. We do not lose regressors if we do fit_transform -> inverse_transform -> transform
  5. Flag return_features works correctly
  6. Full test in Pipeline.backtest method

Alternatives

No response

Additional context

No response

Checklist

  • I discussed this issue with ETNA Team
@alex-hse-repository alex-hse-repository added the enhancement New feature or request label May 13, 2022
@alex-hse-repository alex-hse-repository moved this to Specification in etna board May 13, 2022
@alex-hse-repository alex-hse-repository moved this from Specification to Todo in etna board May 16, 2022
@julia-shenshina julia-shenshina self-assigned this May 25, 2022
@julia-shenshina julia-shenshina removed their assignment Jun 6, 2022
@scanhex12 scanhex12 self-assigned this Jun 6, 2022
@scanhex12 scanhex12 mentioned this issue Jun 7, 2022
9 tasks
@martins0n martins0n moved this from Todo to In Progress in etna board Jun 7, 2022
@martins0n martins0n moved this from In Progress to In Review in etna board Jun 7, 2022
Repository owner moved this from In Review to Done in etna board Jun 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants