SHARE
TWEET

Untitled

a guest Oct 21st, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top