lmcinnes / umap

Uniform Manifold Approximation and Projection
BSD 3-Clause "New" or "Revised" License
7.35k stars 799 forks source link

continuous UMAP latent space #831

Open spagliarini opened 2 years ago

spagliarini commented 2 years ago

Hi,

I have been using UMAP for cluster visualization for long time now. I would like now to build continuous trajectories using UMAP (what I am trying to represent are words). I have seen this done in some works, and I have been checking the documentation and the paper, but couldn't find the reference to how to build such a representation? Could you give any?

I am talking about something like Fig. 18 here: https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1008228

Thank you so much!

lmcinnes commented 2 years ago

I think you will want to look into ParametricUMAP (included in this package) by Tim Sainburg (@timsainb). The documentation has some basic mentions of it, but you way also want to look into the paper on Parametric UMAP, and possibly even reach out to Tim directly.

timsainb commented 2 years ago

Hi Silvia,

This is the code for the figure you mentioned: https://github.com/timsainb/avgn_paper/blob/V2/notebooks/05.0-viz-transitions-continuous/english-traj/english-say-day-way-4ms.ipynb https://github.com/timsainb/avgn_paper/blob/V2/notebooks/05.0-viz-transitions-continuous/english-traj/english-words-latent-trajectory.ipynb

All of the figures in that paper are produced by notebooks in that repo. It's a little messy, feel free to email me if you have questions. That code predates parametric umap, but parametric umap would also be a good way of creating the continuous trajectories as Leland mentioned. Those figures are just produced by dragging a sliding window along the spectrogram and projecting each frame in the sliding window.

spagliarini commented 2 years ago

Thank you so much to both of you for the references, and the availability! I will look into them.