Repository navigation
DOC - add decision boundary visualization to plot_gpc_iris - #34509
Conversation
|
Thank you for opening your first pull request to scikit-learn! 🎉 To help get your contribution reviewed, please make sure that:
|
AnneBeyer
left a comment
There was a problem hiding this comment.
Thank you @mcvincekova! The output looks very nice already. I added two small comments below, then I'd say this one is good to go!
There was a problem hiding this comment.
Could you please check if the plot changes when you remove these two lines? If the output looks the same, you can also remove lines 30 and 37-40 above, which are now also computed inside the Display class.
There was a problem hiding this comment.
You were indeed correct, the display class handles it.
AnneBeyer
left a comment
There was a problem hiding this comment.
Thank you for the quick response, @mcvincekova, LGTM now!
The example used to look like this

and with this PR now looks like this

So on top of simplifying the code and using more accessible colors, the change of using the display's default plotting method (contourf) also improves the illustration of the subtle differences the example is highlighting.
@StefanieSenger, could you have a look as well?
StefanieSenger
left a comment
There was a problem hiding this comment.
Looks good to me. Thank you very much @mcvincekova!
I've only got two nit comments.
Co-authored-by: Stefanie Senger <[email protected]>
Co-authored-by: Stefanie Senger <[email protected]>
|
Congrats on your first contribution to scikit-learn, @mcvincekova! 🎉 🎉 🎉 |
Co-authored-by: Stefanie Senger <[email protected]>
Co-authored-by: Stefanie Senger <[email protected]>
Reference Issues/PRs
Addresses #33980.
What does this implement/fix? Explain your changes.
DecisionBoundaryDisplay.from_estimatorFirst time contributor introduction
Hello, I use
scikit-learnas a go-to tool for prototyping and analytical work when the use-case allows it (i.e. I don't need power tools such aspytorchor LLMs).This contribution was kick-started by the Sprints at Europython 2026 and is a way for me to finally give something back to this wonderful project.
AI usage disclosure
No AI used for this change.
Any other comments?