Skip to content
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

DOC fix colors in scatter plots of plot_kernel_approximation.py #25329

Merged
merged 2 commits into from Jan 14, 2023

Conversation

i-aki-y
Copy link
Contributor

@i-aki-y i-aki-y commented Jan 8, 2023

Reference Issues/PRs

No

What does this implement/fix? Explain your changes.

The current visualization for decision surfaces and data points seems to have some inconsistencies.

current_version

see also, https://scikit-learn.org/stable/auto_examples/miscellaneous/plot_kernel_approximation.html#sphx-glr-auto-examples-miscellaneous-plot-kernel-approximation-py

Following are some examples of inconsistencies.

  1. The lower area of the "SVC with rbf kernel" plot (Left) is painted light-red, but the same area of other plots (Center, Right) is colored green. Note that these surfaces belong to the same label(=4).
  2. The purple area (lower left in each plot) covers yellow and blue points. It is difficult to tell if the purple area correctly classifies these yellow or blue points or none of them because of inconsistency between the colors of the surfaces and the points.

The new version tried to fix these problems. See the figure below.

new_version

Any other comments?

@glemaitre glemaitre changed the title DOC: fix color maps of contour and scatter plots in the plot_kernel_approximation.py example. DOC fix colors in scatter plots of plot_kernel_approximation.py Jan 14, 2023
@glemaitre
Copy link
Member

LGTM. Thanks @i-aki-y

@glemaitre glemaitre merged commit 1a4cc0b into scikit-learn:main Jan 14, 2023
jjerphan pushed a commit to jjerphan/scikit-learn that referenced this pull request Jan 20, 2023
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
jjerphan pushed a commit to jjerphan/scikit-learn that referenced this pull request Jan 20, 2023
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
jjerphan pushed a commit to jjerphan/scikit-learn that referenced this pull request Jan 23, 2023
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
adrinjalali pushed a commit that referenced this pull request Jan 24, 2023
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
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.

None yet

2 participants