Annoy angular distance clarification

202 views
Skip to first unread message

Rod Liu

unread,
Feb 1, 2022, 2:53:15 PM2/1/22
to annoy-user
I am trying to convert angular distance to cosine similarity. Is the formula in the readme correct? where angular distance = sqrt(2(1-cos(u,v)))?

Making C (cosine similarity), and A (angular distance) related like so:
C = -(A^2/2) + 1

Or is angular-distance == cosine-distance where:
cosine_similarity = 1 - cosine_distance

Erik Bernhardsson

unread,
Feb 1, 2022, 2:54:01 PM2/1/22
to Rod Liu, annoy-user
The docs should be correct 

--
You received this message because you are subscribed to the Google Groups "annoy-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to annoy-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/annoy-user/c1ee76d5-e832-46b4-8b8f-93db96ea8ff7n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages