Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. from sklearn.manifold import SpectralEmbedding
  2. model = SpectralEmbedding(n_components = 2, n_neighbors = 50)
  3. se = model.fit_transform(np.log(X_train + 1))
  4. plt.figure(figsize=(20,15))
  5. plt.scatter(se[:, 0], se[:, 1], c = y_train.astype(int), cmap = 'tab10', s = 50)
  6. plt.title('Laplacian Eigenmap', fontsize = 20)
  7. plt.xlabel("LAP1", fontsize = 20)
  8. plt.ylabel("LAP2", fontsize = 20)
  9. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement