-
-
Notifications
You must be signed in to change notification settings - Fork 25.5k
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
Bug in sklearn.manifold tsne #3526
Labels
Comments
I agree, the squared named parameter is annoying when specifying custom distance metrics. Also for squared euclidean distance which I believe was intended, we can use the |
AlexanderFabisch
pushed a commit
to AlexanderFabisch/scikit-learn
that referenced
this issue
Oct 13, 2014
Some of the pairwise distances do not support the additional `squared` parameter. I suggest using `sqeuclidian` and such whenever this is required.
AlexanderFabisch
pushed a commit
to AlexanderFabisch/scikit-learn
that referenced
this issue
Oct 13, 2014
AlexanderFabisch
pushed a commit
to AlexanderFabisch/scikit-learn
that referenced
this issue
Oct 20, 2014
Some of the pairwise distances do not support the additional `squared` parameter. I suggest using `sqeuclidian` and such whenever this is required.
AlexanderFabisch
pushed a commit
to AlexanderFabisch/scikit-learn
that referenced
this issue
Oct 20, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It looks to me there's an issue when using some distance different from 'euclidean' in tsne implementation.
Example:
In fact at lines 438-439 of sklearn/manifold/t_sne.py function _fit() I read:
distances = pairwise_distances(X, metric=self.metric, squared=True)
which means that it always provides 'squared' argument to pairwise_distances(). Now, not all the distances support this (see sklearn/metric/pairwise.py), which leads to an error.
I report this as an issue because in t_sne.py from line 338 it says:
I'd suggest to substitute line 438 with something like:
but I'm quite sure it's not as simple as that: I don't, for example, understand why the author wanted
squared=True
.Cheers
The text was updated successfully, but these errors were encountered: