Skip to content

Instantly share code, notes, and snippets.

@azkalot1
Created February 12, 2019 22:49
Show Gist options
  • Save azkalot1/b4bb1446e206220b553048ac740e3640 to your computer and use it in GitHub Desktop.
Save azkalot1/b4bb1446e206220b553048ac740e3640 to your computer and use it in GitHub Desktop.
pca = PCA(n_components=100)
pca.fit(mat)
mat_reduce = pca.transform(mat)
embedding = umap.UMAP(n_neighbors=5,
min_dist=0.5,
metric='euclidean').fit_transform(mat_reduce)
plt.figure(figsize=(15,15))
plt.scatter(embedding[:,0],embedding[:,1],s=0.2);
plt.title('Naive clustering');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment