Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from sklearn.manifold import SpectralEmbedding
- model = SpectralEmbedding(n_components = 2, n_neighbors = 50)
- se = model.fit_transform(np.log(X_train + 1))
- plt.figure(figsize=(20,15))
- plt.scatter(se[:, 0], se[:, 1], c = y_train.astype(int), cmap = 'tab10', s = 50)
- plt.title('Laplacian Eigenmap', fontsize = 20)
- plt.xlabel("LAP1", fontsize = 20)
- plt.ylabel("LAP2", fontsize = 20)
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement