-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
DOC Removing warnings from plot CV examples #29072
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
Conversation
import matplotlib.pyplot as plt | ||
import numpy as np | ||
from matplotlib.patches import Patch | ||
|
||
# Removing warnings from examples | ||
warnings.filterwarnings("ignore") |
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 think this removes all warnings. I would prefer that we only remove UserWarnings.
Filtering warnings should be the last of the options. In this case I was thinking more of modifying the use_groups = 'Group' in type(cv).__name__
groups = group if use_groups else None
# Generate the training/testing visualizations for each CV split
for ii, (tr, tt) in enumerate(cv.split(X=X, y=y, groups=groups)):
... |
Thanks for the feedback, @ArturoAmorQ. If I may ask, why is removing all the warnings from this doc page not a good idea? |
Because of several possibilities:
|
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.
In any case, this PR looks good to me as it is. Thanks for your contribution @ojoaomorais!
Reference Issues/PRs
#29055
What does this implement/fix? Explain your changes.
Removing warnings from plot CV examples