Skip to content

DOC Update docs for StandardScaler.scale_ to include 0 variance #19124

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

Merged
merged 2 commits into from
Jan 9, 2021

Conversation

KunjParikh
Copy link
Contributor

Reference Issues/PRs

Fixes #19104

What does this implement/fix? Explain your changes.

Updates the docstring of StandardScaler's scale_ attribute to include the scenario when variance is 0, so that scale_ is not sqrt(var).

Any other comments?

Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

Thank you for the PR @KunjParikh !

Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
@thomasjpfan thomasjpfan changed the title [MRG] Update documentation of StandardScaler.scale_ to include 0 variance DOC Update docs for StandardScaler.scale_ to include 0 variance Jan 9, 2021
@thomasjpfan thomasjpfan merged commit 1e46db6 into scikit-learn:master Jan 9, 2021
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Jan 18, 2021
jeremiedbb pushed a commit that referenced this pull request Jan 19, 2021
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Standard Scalar scaler.scale_ = np.sqrt(scaler.var_)
3 participants