-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
PCA inner function collision with matplotlib.pyplot #19285
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
Comments
There's probably something fishy going on in |
@NicolasHug pls ignore the display(x_pca) that just print of PCA result..I edited the above code |
I can't reproduce your error @MichalRIcar . Given the error message it is likely that you are somehow modifying I will close the issue until we can get an actual reproducible example. |
@NicolasHug pls check the 5s recording of my screen which explains what is said (I don't do anything with data) https://drive.google.com/file/d/1y3b67BbbcEI28dGvPX4F-1d3GMq4kOw3/view?usp=sharing |
I tried your code replacing Can you make sure that DATA is the same before and after the first execution? |
Just checked and data are same before and after run. Tried the same strategy and changed DATA to np.random.randn(100, 10). Behavior is same, every even run it crashes, however reason is different: LinAlgError: SVD did not converge |
Screen Recording with np.random.randn(100, 10) https://drive.google.com/file/d/13i9TyA_zpYGtpwi9skJ58cUeO28GZxMF/view?usp=sharing |
I'm going to re-open the issue but TBH I have no idea what's going on. This is really unexpected |
I cannot reproduce the issue in notebook or ipython. This bug does not make any sense. I am not sure that this is due to our code because the first time the randomized solver is used and the second set, the scipy solver is used. So it is not even solver dependent. Could you give more information regarding the platform and the jupyter and jupyter notebook version. |
Hello, agree it doesn't make much sense. It took me a while to track it as I didn't guess such dependency. the packages are installed via PIP: |
@jeremiedbb Can you reproduce on Windows? |
played with it a little bit and swap the order of the two, perhaps it is showing some direction recording |
Related to #17788? |
It looks like.
…On Thu, 28 Jan 2021 at 09:38, Joel Nothman ***@***.***> wrote:
Related to #17788
<#17788>?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#19285 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABY32P6MXVUN3GRDDXSJEA3S4EPA7ANCNFSM4WVDRHTA>
.
--
Guillaume Lemaitre
Scikit-learn @ Inria Foundation
https://glemaitre.github.io/
|
nope, works fine |
@MichalRIcar While it will not solve this issue directly, could you create a conda environment from scratch and install the minimum number of libraries and try to reproduce. |
@glemaitre, gave it a shot:
|
BTW I ran into this also (unrelated to matplotlib). In recent versions PCA seems to sometimes randomly error out. either with the above error or linalgerror dabl/dabl#248 |
Amazing! Just updated numpy (1.20.0→1.20.1) and problem solved, amazing job, guys! |
Hi @MichalRIcar, it seems that the issue has been solved then 🚀. I'm closing it. |
Hello,
Describe the bug
sklearn.decomposition.PCA
has an inner function collision with matplotlib.pyplot as code with data shows below
Steps/Code to Reproduce
DATA.zip
Expected Results
FIRST TIME FULL CODE PASSES (in general odd run), SECOND TIME RUN (in general even run):
Actual Results for even runs
The text was updated successfully, but these errors were encountered: