]> code.communitydata.science - cdsc_reddit.git/blobdiff - fit_tsne.py
Fix bug in tsne.
[cdsc_reddit.git] / fit_tsne.py
index 37341d47ad8eec933c4acc58fee7d5b9af374a9a..dd9fb93809a289e81babf7dfa90b6d9897b0791f 100644 (file)
@@ -28,7 +28,7 @@ tsne_model = TSNE(2,learning_rate=200,perplexity=40,n_iter=5000,metric='precompu
 
 tsne_fit_model = tsne_model.fit(dist)
 
-tsne_fit_whole = tsne_fit_model.fit_transform(mat)
+tsne_fit_whole = tsne_fit_model.fit_transform(dist)
 
 plot_data = pd.DataFrame({'x':tsne_fit_whole[:,0],'y':tsne_fit_whole[:,1], 'subreddit':col_names})
 

Community Data Science Collective || Want to submit a patch?