ENH Add option to scale output to unit var in RobustScaler#17193
ENH Add option to scale output to unit var in RobustScaler#17193glemaitre merged 26 commits intoscikit-learn:masterfrom
Conversation
|
In QuantileTransformer this is available as: |
|
I suppose it's not the same. Here it's just a change in scale? Still, it would be nice if the options looked more similar to each other?? |
|
I see your point but what would you suggest? This seems a bit clunky? |
Yes it is just a change in scale. Normally the standard deviation of the output distribution for 0.25,0.75 quartiles is: The adjusted scale just changes the standard deviation to ~1 by changing the scale: where |
|
Maybe: which is vaguely more similar to QuantileTransformer |
|
Don't know what the right name is... |
|
Or just Semi-related: should that become the default, i.e. should we deprecate it being False? |
|
Thanks for the reviews. I've used |
jnothman
left a comment
There was a problem hiding this comment.
otherwise LGTM
Please add an entry to the change log at doc/whats_new/v0.24.rst. Like the other entries there, please reference this pull request with :pr: and credit yourself (and other contributors if applicable) with :user:
|
ping @glemaitre. I also added more explanation of what the parameter does generally as suggested by @adrinjalali, but I'm not sure about the wording...
|
|
Amended! |
|
Thanks @lucyleeow merging |
…arn#17193) Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
…arn#17193) Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Reference Issues/PRs
Follows from PR #10140
closes #10139
What does this implement/fix? Explain your changes.
Adds gauss_adjust parameter to
RobustScalerso transformed data is standard Gaussian when the input data was a Gaussian distribution.Adds test to check that this option makes StandardScaler and RobustScaler equivalent on normal data as suggested by @amueller. Note these are only equivalent with a large dataset. Not sure if the parameters I used are optimal, open to suggestions.
Any other comments?