Python Forum
IS there a way to preserve some order in a tSNE/PCA plot?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IS there a way to preserve some order in a tSNE/PCA plot?
#1
Hi,

I was wondering if there is any way to preserve the order of a group of vectors in a tSNE or PCA plot.

I have vectors of common words from different (temporal) word2vec models. I have aligned and trained the data using a temporal word embedding package.

I would like to plot how common words change their meaning over time in one tSNE/PCA. I have actually achieved this without issue! however, it doesn't (of course) respect temporal order. I was wondering if there is a way by which the distance between vectors can be preserved, but the positioning of vectors themselves can be placed in a temporal order?

For the origiunal data, the vectors for common words over time (and their neighbours) are extracted from the word2vec model and embeddings as follows:

tsne = TSNE(n_components=2, random_state=0)
Y = tsne.fit_transform(concat)
normal scatter plot plotting: which looks as in image attached. again this achieves exactly what i want. but is there a way of positioning the individual time vectors (doesnt matter if vertical horizontal, diagonal) in their original temporal order? legend on the bottom shows temporal order (p3-p730).. obviously the vectors in space dont respect this trajectory.

any help or advice would be appreciated!
   
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] IS there a way to preserve some order in a tSNE/PCA plot? majidvaghari 0 1,010 Feb-02-2022, 08:40 AM
Last Post: majidvaghari

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020