Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/msminhas93/embeddings-visualization
https://github.com/msminhas93/embeddings-visualization
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/msminhas93/embeddings-visualization
- Owner: msminhas93
- Created: 2021-01-31T03:14:14.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-31T03:25:54.000Z (almost 4 years ago)
- Last Synced: 2024-11-01T06:42:05.404Z (3 months ago)
- Language: Jupyter Notebook
- Size: 1.93 MB
- Stars: 36
- Watchers: 1
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Embeddings / Feature Vector visualization using t-SNE and PCA
This repository contains the code for visualizing embeddings / feature vectors using t-SNE and PCA.The example plots are shown for model trained on the MNIST dataset with 1000 noise images randomly injected into the test set. The training code is also available. I used PyTorch and Lightning in this for the DL component. However, the logic should be similar for any framework.The sample plots of embeddings extracted from a trained model are shown below.
t-SNE plot 2D
![t-SNE plot 2D](plots/TSNEtrained.png)
t-SNE plot 3D
![t-SNE plot 3D](plots/TSNE3D.png)
PCA plot 2D
![PCA plot 2D](plots/PCAtrained.png)
PCA plot 3D
![PCA plot 3D](plots/PCA3D.png)
I've shown the projections of embeddings extracted from randomly initialized model as well.
t-SNE plot 2D
![t-SNE plot 2D](plots/TSNErandom.png)
PCA plot 2D
![PCA plot 2D](plots/PCArandom.png)