Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OneHotEncodingTransformer producing all zeros #135

Closed
fealho opened this issue Nov 12, 2020 · 0 comments · Fixed by #136
Closed

OneHotEncodingTransformer producing all zeros #135

fealho opened this issue Nov 12, 2020 · 0 comments · Fixed by #136
Assignees
Labels
bug Something isn't working
Milestone

Comments

@fealho
Copy link
Member

fealho commented Nov 12, 2020

  • CTGAN version: 0.2.2.dev2

Currently, OneHotEncodingTransformer.transform may silently return vectors with all zeros, instead of raising an error. This happens whenever we try to transform data that we haven't seen before:

ohet = OneHotEncodingTransformer()
data = pd.Series(['a', 'b', 'c'])
ohet.fit(data)
ohet.transform(['d'])  #produces [0, 0, 0]           

I believe an error should be thrown is such situations, since it is not a one hot vector.

@csala csala added this to the 0.2.8 milestone Nov 20, 2020
@csala csala added the bug Something isn't working label Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants