Created
August 5, 2018 08:32
-
-
Save patricoferris/bd47eb274ca7262c2758028d4dcb7ad9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
from sklearn.manifold import TSNE | |
import matplotlib.pyplot as plt | |
tsne = TSNE(perplexity=30, n_components=2, verbose=1, init='pca', n_iter=500, method='exact') | |
plot_only = len(artist_lookup) | |
low_dim_embs = tsne.fit_transform(final_embeddings[:plot_only, :]) | |
except ImportError as ex: | |
print('Please install sklearn, matplotlib, and scipy to show embeddings.') | |
print(ex) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment