Skip to content

Conversation

brdav
Copy link
Contributor

@brdav brdav commented Aug 27, 2024

In this example the axes of the plots are distorted. As a consequence the plotted ICA and PCA components are incorrect. It can be easily seen in
https://scikit-learn.org/stable/auto_examples/decomposition/plot_ica_vs_pca.html#sphx-glr-auto-examples-decomposition-plot-ica-vs-pca-py
that the ICA components (red arrows) should be aligned with the data-generating components in the upper right plot, which is not the case. Similarly, the PCA components (orange arrows) are off too. Simply fixing the axis scaling fixes this issue, and plots the components correctly.

Copy link

github-actions bot commented Aug 27, 2024

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: be8488c. Link to the linter CI: here

@lesteve
Copy link
Member

lesteve commented Aug 30, 2024

Thanks for the PR and catching this:
new plot from rendered HTML
image

plot on dev doc
image

@lesteve lesteve changed the title Fix axis scaling in example plot_ica_vs_pca.py EXA Fix axis scaling in example plot_ica_vs_pca.py Aug 30, 2024
@lesteve lesteve added the Quick Review For PRs that are quick to review label Aug 31, 2024
Copy link
Contributor

@OmarManzoor OmarManzoor left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @brdav

@OmarManzoor OmarManzoor merged commit 1f47fbd into scikit-learn:main Sep 4, 2024
36 checks passed
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Quick Review For PRs that are quick to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants