how does n_similarity work?

40 views
Skip to first unread message

Joan Carrillo Baron

unread,
Oct 29, 2022, 10:59:09 AM10/29/22
to Gensim
Hello Gensim group I am training a model Word2Vec, but I would like to know how n_similarity works.  I know it works with cosine distance, but I want to deepen.
I normally send a matrix of vectors with 250 dimensions each.
Thank u very much

Gordon Mohr

unread,
Oct 31, 2022, 1:06:40 PM10/31/22
to Gensim
The source code is 5 lines:


The doc-comment is somewhat out-of-date; as the helper method `KeyedVectors.get_mean_vector()` now accepts either keys to lookup known vectors, or raw vectors themselves, the method can do more than the description "Compute cosine similarity between two sets of keys." implies. But, if you're already sending it vectors, you already know that. 

What remains unclear, specifically?

- Gordon
Reply all
Reply to author
Forward
0 new messages