Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC refactor examples/ensemble/plot_forest_iris.py to use DecisionBoundaryDisplay - #34556

Merged
ArturoAmorQ merged 3 commits into
scikit-learn:mainfrom
LuShadowX:doc/use-decisionboundarydisplay-forest-iris
Aug 3, 2026
Merged

DOC refactor examples/ensemble/plot_forest_iris.py to use DecisionBoundaryDisplay#34556
ArturoAmorQ merged 3 commits into
scikit-learn:mainfrom
LuShadowX:doc/use-decisionboundarydisplay-forest-iris

Conversation

@LuShadowX

@LuShadowX LuShadowX commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Towards #33980

@github-actions

Copy link
Copy Markdown

Thank you for opening your first pull request to scikit-learn! 🎉

To help get your contribution reviewed, please make sure that:

  • You have filled out the pull request template.
  • The pull request addresses an existing issue that is ready for
    contribution (e.g. not tagged as "Needs Triage", "Needs Decision", ...).
    If you are proposing a new feature, please open an issue to discuss it first.
  • There are no other open pull requests already targeting the same issue.
  • You have followed the pull request checklist.
    In particular, linting and tests should pass.

@ArturoAmorQ ArturoAmorQ left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi @LuShadowX thanks for contributing! Couple of suggestions to maintain the intended behavior and remove the UserWarnings.

You can also remove unused variable plot_step = 0.02.

And now that the defined variable cmap = plt.cm.RdYlBu is used only once in the scatterplot, I think you can explicitly set it there for better code readability, then remove the definition.

Comment thread examples/ensemble/plot_forest_iris.py
Comment thread examples/ensemble/plot_forest_iris.py
@LuShadowX

Copy link
Copy Markdown
Contributor Author

Thanks for the review — all applied in 9382b4f.

Both suggestions taken as-is, plus plot_step and the cmap definition removed; the scatter now passes plt.cm.RdYlBu directly.

Confirmed against a 1.10.dev0 nightly with UserWarning, FutureWarning and DeprecationWarning as errors: the example runs clean now, where the previous form raised UserWarning: 'cmap' is ignored in favor of 'target_colors' in the multiclass case. Scores are unchanged.

@ArturoAmorQ ArturoAmorQ left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Otherwise LGTM. Thanks again @LuShadowX

Comment thread examples/ensemble/plot_forest_iris.py Outdated
Comment thread examples/ensemble/plot_forest_iris.py Outdated
Comment thread examples/ensemble/plot_forest_iris.py Outdated
@ArturoAmorQ
ArturoAmorQ enabled auto-merge (squash) August 3, 2026 15:47
@ArturoAmorQ
ArturoAmorQ merged commit 1a970e8 into scikit-learn:main Aug 3, 2026
36 checks passed
@LuShadowX

Copy link
Copy Markdown
Contributor Author

happy to help. if u want me to work on anything fell free to ask.

prady0t pushed a commit to prady0t/scikit-learn that referenced this pull request Sep 2, 2026
@jeremiedbb jeremiedbb mentioned this pull request Sep 8, 2026
14 tasks
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Sep 8, 2026
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Sep 9, 2026
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.

2 participants