You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
This Java implementation defines ANGULAR distance as "cosine similarity", while the C++/python implementation defines ANGULAR distance as "approximate theta".
Evidence:
Java implementation -- dot(u,v), the value of cosine
Related issue defining "angular" method in the other repo: spotify/annoy#530
Because this would be a significant breaking change, I did not put a PR together. Would the lead devs provide guidance on the appropriate way to name a new distance that implements angular correctly ("angular-cpp" or "angular-correct"?).
This Java implementation defines ANGULAR distance as "cosine similarity", while the C++/python implementation defines ANGULAR distance as "approximate theta".
Evidence:
Java implementation -- dot(u,v), the value of cosine
annoy-java/src/main/java/com/spotify/annoy/ANNIndex.java
Line 189 in aef275b
annoy-java/src/main/java/com/spotify/annoy/ANNIndex.java
Line 319 in aef275b
C++ / python implementation -- sqrt(2 * (1 - dot(u,v))), an approximation of theta
https://github.com/spotify/annoy/blob/6f6b0c84ab413337eb4d2e850a4cba637f52ccbc/src/annoylib.h#L473
https://github.com/spotify/annoy/blob/6f6b0c84ab413337eb4d2e850a4cba637f52ccbc/src/annoylib.h#L502
Related issue defining "angular" method in the other repo: spotify/annoy#530
Because this would be a significant breaking change, I did not put a PR together. Would the lead devs provide guidance on the appropriate way to name a new distance that implements angular correctly ("angular-cpp" or "angular-correct"?).