5 ms·
There aren't any alternatives: cosine similarity is effectively an extension of Euclidian distance, which is the mathematical correct way for finding the distan
by minimaxir 3y ago
There aren't any alternatives: cosine similarity is effectively an extension of Euclidian distance, which is the mathematical correct way for finding the distance between vectors.
You may not want to use cosine similarity as your only metric for rankings, however, and you may want to experiment with how you construct the embeddings.
- rocqua 3y agoEuclidean distance is only 'mathematically correct' if you care about rotations in your space being distance preserving. I don't think that is really the case in these spaces. There is a whole branch of mathematics called dedicated to other ways to measure distance.
- 0xdeadbeefbabe 3y agoHow wouldn't distances be preserved under rotation. I'm asking for a friend of course.
- rocqua 3y agoIn the Manhattan distance for example if you rotate your coordinate grid, distances will change.