Repository navigation
DOC Removing warnings from plot CV examples - #29072
Conversation
| from matplotlib.patches import Patch | ||
|
|
||
| # Removing warnings from examples | ||
| warnings.filterwarnings("ignore") |
There was a problem hiding this comment.
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:
|
ArturoAmorQ
left a comment
There was a problem hiding this comment.
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