Skip to content

Add CategoricalEncoderTransforms #355

Closed
1 task done
iKintosh opened this issue Dec 3, 2021 · 0 comments · Fixed by #431
Closed
1 task done

Add CategoricalEncoderTransforms #355

iKintosh opened this issue Dec 3, 2021 · 0 comments · Fixed by #431
Assignees
Labels
enhancement New feature or request

Comments

@iKintosh
Copy link
Contributor

iKintosh commented Dec 3, 2021

🚀 Feature Request

Adapt categorical encoders from Sklearn into etna

Motivation

Really frustrating when such simple transform is absent in etna

Proposal

Create sklearn converter for
https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.LabelEncoder.html
https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.LabelBinarizer.html

Create 2 classes LabelEncoderTransform and LabelBinarizerTransform
Should work with int and str types.

If meet unknown label:

  1. LabelEncoderTransform should use mean label value
  2. LabelBinarizerTransform should use mean label vector value

The return column should be categorical.

Inverse transform is not necessary (but it should be easy to do)

Test cases

No response

Alternatives

No response

Additional context

No response

Checklist

  • I discussed this issue with ETNA Team
@iKintosh iKintosh added the enhancement New feature or request label Dec 3, 2021
@iKintosh iKintosh changed the title Add CategoricalEncoderTransform Add CategoricalEncoderTransforms Dec 3, 2021
@Ama16 Ama16 self-assigned this Dec 28, 2021
@Mr-Geekman Mr-Geekman linked a pull request Jan 12, 2022 that will close this issue
9 tasks
@Mr-Geekman Mr-Geekman mentioned this issue Jan 12, 2022
9 tasks
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.

2 participants