I was confused with the results of most_similar and similar_by_vector from gensim's Word2vecKeyedVectors. They are supposed to calculate cosine similarities in the same way - however:
Running them with one word gives identical results, for example: model.most_similar(['obama']) and similar_by_vector(model['obama'])
but if I give it an equation:
model.most_similar(positive=['king', 'woman'], negative=['man'])
gives:
[('queen', 0.7515910863876343), ('monarch', 0.6741327047348022), ('princess', 0.6713887453079224), ('kings', 0.6698989868164062), ('kingdom', 0.5971318483352661), ('royal', 0.5921063423156738), ('uncrowned', 0.5911505818367004), ('prince', 0.5909028053283691), ('lady', 0.5904011130332947), ('monarchs', 0.5884358286857605)]
while with:
q = model['king'] - model['man'] + model['woman']
model.similar_by_vector(q)
gives:
[('king', 0.8655095100402832), ('queen', 0.7673765420913696), ('monarch', 0.695580005645752), ('kings', 0.6929547786712646), ('princess', 0.6909604668617249), ('woman', 0.6528975963592529), ('lady', 0.6286187767982483), ('prince', 0.6222133636474609), ('kingdom', 0.6208546161651611), ('royal', 0.6090123653411865)]
There is a noticable difference in cosine distance of the words queen, monarch... etc. I'm wondering why?
Thanks!