Custom embedding initialization
See original GitHub issueLooking at the embedding initialization options, I see ‘random’ and ‘spectral’. Would it be possible to initialize with a custom embedding? And if so, would this embedding be at all preserved?
In trying to compare the effect of different parameter changes, it could be helpful to use the embedding of a previous run as the initialization to a new UMAP instance with slightly different parameters. For example, these two min_dist
values result in embeddings with different global orientations but similar local relationships.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Keras initialize large embeddings layer with pretrained ...
I am trying to re-train a word2vec model in Keras 2 with Tensorflow backend by using pretrained embeddings and custom ...
Read more >Embedding — PyTorch 1.13 documentation
A simple lookup table that stores embeddings of a fixed dictionary and size. This module is often used to store word embeddings and...
Read more >A Custom Embedding Layer for Numeric Input for PyTorch
I've been exploring the idea of applying TA to tabular data. The problem is that in NLP all inputs are integers that represent...
Read more >Word embeddings | Text - TensorFlow
This tutorial contains an introduction to word embeddings. You will train your own word embeddings using a simple Keras model for a sentiment...
Read more >Embedding layer - Keras
Embedding class · input_dim: Integer. · output_dim: Integer. · embeddings_initializer: Initializer for the embeddings matrix (see keras. · embeddings_regularizer: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
great! it works!
the only hurdle i had to get across: t-SNE tends towards larger embeddings than umap. for example, t-SNE with default parameters embeds MNIST into a +/-35 range while UMAP is closer to +/-15. so initializing with the raw output of t-SNE produces some minor artifacts. once i scale the t-SNE output closer to the UMAP output it works better.
some gifs for your trouble:
https://www.dropbox.com/s/wbv73swh6qlrexg/mnist-all-init-0.8.gif?dl=0
this one is UMAP with min_dist=0.8 and initialized with a t-SNE embedding scaled by 0.4.
https://www.dropbox.com/s/cufrbjsbm79a3kh/mnist-all-init.gif?dl=0
this one is UMAP with default parameters also initialized with a t-SNE embedding scaled by 0.4.
the final embeddings of both are normalized uniformly across both axes to fill the screen with a little padding.
That’s a great idea for making the comparison clear. It certainly raises the priority on getting the custom initialisation done!