Skip to content

BUG avoid nan variance with sparse input in StandardScaler - #16466

Merged
jnothman merged 9 commits into
scikit-learn:masterfrom
glemaitre:is/16448
Feb 26, 2020
Merged

BUG avoid nan variance with sparse input in StandardScaler#16466
jnothman merged 9 commits into
scikit-learn:masterfrom
glemaitre:is/16448

Conversation

@glemaitre

@glemaitre glemaitre commented Feb 17, 2020

Copy link
Copy Markdown
Member

closes #16448

Some issues due to expectations regarding integer casting. The statistics where wrongly reported due to this C division casting.

@glemaitre

Copy link
Copy Markdown
Member Author

@NicolasHug It seems that you are around. This is an easy one. Only a single line of change in the code :)

Comment thread sklearn/utils/sparsefuncs_fast.pyx Outdated
Comment thread doc/whats_new/v0.23.rst Outdated
Comment thread sklearn/utils/tests/test_sparsefuncs.py Outdated
Comment thread sklearn/utils/tests/test_sparsefuncs.py Outdated

@jeremiedbb jeremiedbb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick

Comment thread sklearn/utils/tests/test_sparsefuncs.py Outdated
Comment thread sklearn/utils/tests/test_sparsefuncs.py Outdated
Comment thread sklearn/utils/tests/test_sparsefuncs.py Outdated
Co-Authored-By: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>

@jeremiedbb jeremiedbb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jnothman
jnothman merged commit b8c4027 into scikit-learn:master Feb 26, 2020
panpiort8 pushed a commit to panpiort8/scikit-learn that referenced this pull request Mar 3, 2020
gio8tisu pushed a commit to gio8tisu/scikit-learn that referenced this pull request May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sklearn.preprocessing.StandardScaler gets NaN variance when partial_fit with sparse data

3 participants