Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Problem with d=3 #11

Open
kylemcdonald opened this issue Mar 24, 2016 · 1 comment
Open

Problem with d=3 #11

kylemcdonald opened this issue Mar 24, 2016 · 1 comment

Comments

@kylemcdonald
Copy link

I get buggy results when running with d=3. Here is some example code comparing d=2 to d=3.

%matplotlib inline
from matplotlib import pyplot as plt
import numpy as np
from tsne import bh_sne
X = np.random.random((1000,100))

X_2d = bh_sne(X, d=2)
plt.scatter(X_2d[:,0], X_2d[:,1], s=2, edgecolor='')
plt.show()

X_3d = bh_sne(X, d=3)
plt.scatter(X_3d[:,0], X_3d[:,1], s=2, edgecolor='')
plt.show()
plt.scatter(X_3d[:,0], X_3d[:,2], s=2, edgecolor='')
plt.show()

good-d2
good
bad

@phunterlau
Copy link

I had the same problem and I can confirm it is from the implementation bug. The scikit-learn TSNE implementation and this wrapper https://github.com/dominiek/python-bhtsne can give the correct result in 3D, and the later one runs fast (although it is gcc-6 incompatible)

@danielfrg danielfrg reopened this May 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants