Created
November 22, 2019 16:11
-
-
Save danielhanchen/6365099838a055ed2299f10ab86b78ba to your computer and use it in GitHub Desktop.
RAPIDS cuML TSNE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sklearn.datasets import load_digits | |
| X, y = load_digits().data, load_digits().target | |
| from cuml.manifold import TSNE | |
| tsne = TSNE(n_components = 2) | |
| X_hat = tsne.fit_transform(X) | |
| # To plot the embedding | |
| import matplotlib.pyplot as plt | |
| %matplotlib inline | |
| plt.scatter(X_hat[:,0], X_hat[:,1], c = y, s = 0.5) |
Author
@ucalyptus There are more examples in the blog: https://medium.com/rapids-ai/tsne-with-gpus-hours-to-seconds-9d9c17c941db [MNIST, Fashion MNIST etc]. https://github.com/rapidsai/cuml is probably the best place for you to ask about extremely large visualization requests! :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi , can you show an example for Hyperspectral images?
data.shape is 145,145,200
targets.shape is 145,145