-
-
Notifications
You must be signed in to change notification settings - Fork 26.6k
EXA Use n_quantiles=500 in plot_map_data_to_normal.py #14149
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
EXA Use n_quantiles=500 in plot_map_data_to_normal.py #14149
Conversation
|
test failing :) |
albertcthomas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM! Thanks @KenitoInc!
| bc = PowerTransformer(method='box-cox') | ||
| yj = PowerTransformer(method='yeo-johnson') | ||
| qt = QuantileTransformer(output_distribution='normal', random_state=rng) | ||
| qt = QuantileTransformer(n_quantiles=500, output_distribution='normal', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add a comment explaining that n_quantiles is set to the training set size to avoid a warning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Avoiding the warning" is doing the correct thing in this case. In this case, n_quantiles=500 is the number of samples in X_train (because test_size=0.5 and N_SAMPLES=1000).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree but I would make this explicit so that someone reading the example or changing the code will know why.
Unless tests will be failing if a warning is raised?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KenitoInc I am sorry if I was not clear but what I meant was more something like "n_quantiles is set to the training set size rather than the default value to avoid a warning being raised by this example"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @albertcthomas I have updated the PR
glemaitre
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@thomasjpfan @albertcthomas I am fine with the comment. I let you both decide if you want to change anything. @KenitoInc Thanks for picking this up. |
|
Ok for me as well. Thanks @KenitoInc! |
|
Thanks! |
…4149) in order to fix warnings
…4149) in order to fix warnings
We are having warning since we are using n_quantiles default values. Fix this by assigning a value to n_quantiles during class initialization.
Related to issue #14117
#WiMLDS
@MaggieChege
@dominicondigo