Skip to content

Instantly share code, notes, and snippets.

@vlavorini
Last active January 14, 2018 18:36
Show Gist options
  • Save vlavorini/98f40f64a88090969b44e1ec494d2938 to your computer and use it in GitHub Desktop.
Save vlavorini/98f40f64a88090969b44e1ec494d2938 to your computer and use it in GitHub Desktop.
#run the dimensionality reduction
embedding = umap.UMAP(n_neighbors=55).fit_transform(df_preprocessed.values)
#plotting results
plt.figure(figsize=(16,6))
plt.scatter(embedding_best[:, 0], embedding_sel[:, 1], color='b', s=10,
alpha=.2, label="Customers", marker='o')
plt.legend(fontsize=16, numpoints=3)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment