-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
ValueError: Input contains NaN.
in sklearn.manifold.smacof
#26999
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
I debug a bit to understand who is the culprit. The issue is here: scikit-learn/sklearn/manifold/_mds.py Lines 125 to 144 in 594475a
The |
If anyone runs into this, and just wants the error to go away, a bit of rounding worked for me (given that my values were near zero). In this case,
|
Thanks for submitting this bug. I just made a PR that fixes it (together with some other things): #30514. |
@glemaitre Happy New Year! Gentle ping to look at my PR that should fix this and other related issues: #30514... It did not receive any feedback yet. |
Describe the bug
I accidentally stumbled onto a
ValueError
when executingsmacof
. I hacked into_mds.py
to save both the offendingdissimilarities
as well as the randomly generatedX
, then cut them down to minimal shape that still exhibits the error. This data is attached below in the MCVE.Steps/Code to Reproduce
Expected Results
No errors
Actual Results
Versions
The text was updated successfully, but these errors were encountered: