I am working with word embedding data with the BERT model. What I have is as below -
What I want to do is plot these texts using their cosine distances(marked
distance in the DataFrame) in a vector space, similar to the picture below -
What would you recommend as the most efficient way to achieve this?
That appears to be a combination of
ax.annotation. What have you tried and what went wrong? It is much easier to help you if we have a minimal code example to start from.
Hi, I’ve managed to get all the points to show now by calculating the X and Y from cosine and euclidean distances. Thanks to your guidance of pointing out the
ax.annotation method, I got the labels as well. As the labels seem far too large at the moment, is there a way to make them appear on hover?