Thanks to visit codestin.com
Credit goes to github.com

Skip to content

OneHotEncoder "only non-negative integers" message should suggest using categories='auto' #12179

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

Closed
jnothman opened this issue Sep 27, 2018 · 4 comments · Fixed by #12180
Closed
Labels
Easy Well-defined and straightforward way to resolve good first issue Easy with clear instructions to resolve
Milestone

Comments

@jnothman
Copy link
Member

before version 0.20, OneHotEncoder did not support negative integers in input. Now it supports that case if the "new behaviour" is requested by instantiating it with categories='auto'. The legacy behaviour currently raises ValueError("X needs to contain only non-negative integers."). This error message should be extended to mention how the new behaviour can be activated.

@jnothman jnothman added Easy Well-defined and straightforward way to resolve good first issue Easy with clear instructions to resolve help wanted labels Sep 27, 2018
@jnothman jnothman added this to the 0.20 milestone Sep 27, 2018
@ygivenx
Copy link
Contributor

ygivenx commented Sep 27, 2018

Can I take this issue?

@jnothman
Copy link
Member Author

jnothman commented Sep 27, 2018 via email

ygivenx pushed a commit to ygivenx/scikit-learn that referenced this issue Sep 27, 2018
OneHotEncoder "only non-negative integers" message should suggest using
categories='auto'
ygivenx pushed a commit to ygivenx/scikit-learn that referenced this issue Sep 27, 2018
    OneHotEncoder "only non-negative integers" message should suggest using
    categories='auto'
ygivenx pushed a commit to ygivenx/scikit-learn that referenced this issue Sep 27, 2018
OneHotEncoder "only non-negative integers" message should suggest using
categories='auto'
@rth rth modified the milestones: 0.20, 0.20.1 Sep 27, 2018
@cynco
Copy link

cynco commented Sep 29, 2018

Johanna and I am working on this.

@amueller
Copy link
Member

@cynco there is already a fix at #12180 (I had removed the "help wanted" label though these are often out of date)

amueller pushed a commit that referenced this issue Oct 1, 2018
…) with negative integer values (#12180)

* Fix Issue #12179

OneHotEncoder "only non-negative integers" message should suggest using
categories='auto'

* Fix Issue #12179

    OneHotEncoder "only non-negative integers" message should suggest using
    categories='auto'

* Fix Issue #12179

OneHotEncoder "only non-negative integers" message should suggest using
categories='auto'

* Fixes #12180 Modify the error message

* Fix the spacing
jnothman pushed a commit to jnothman/scikit-learn that referenced this issue Oct 15, 2018
…) with negative integer values (scikit-learn#12180)

* Fix Issue scikit-learn#12179

OneHotEncoder "only non-negative integers" message should suggest using
categories='auto'

* Fix Issue scikit-learn#12179

    OneHotEncoder "only non-negative integers" message should suggest using
    categories='auto'

* Fix Issue scikit-learn#12179

OneHotEncoder "only non-negative integers" message should suggest using
categories='auto'

* Fixes scikit-learn#12180 Modify the error message

* Fix the spacing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easy Well-defined and straightforward way to resolve good first issue Easy with clear instructions to resolve
Projects
None yet
5 participants