spotify / annoy-java

Approximate nearest neighbors in Java
Apache License 2.0
138 stars 46 forks source link

Results consistently differ from the C++ library #21

Open ag-tcm opened 3 years ago

ag-tcm commented 3 years ago

I did some testing comparing the results from this library and the C++ library and they are consistently different. I needed to get it to work so I went through line by line in a debugger comparing the two and fixed the java code on my local copy. Let me know if you'd like me to push it here so others can use it. Oh, also I added support for the Manhattan distance.

Dawien commented 3 years ago

I did some testing comparing the results from this library and the C++ library and they are consistently different. I needed to get it to work so I went through line by line in a debugger comparing the two and fixed the java code on my local copy. Let me know if you'd like me to push it here so others can use it. Oh, also I added support for the Manhattan distance.

I also encountered the same problem when I was using it. Can you open source the modified code for reference? Thank you very much!

ag-tcm commented 3 years ago

No problem, I put my modified code here: https://github.com/ag-tcm/annoy-java.

Dawien commented 3 years ago

No problem, I put my modified code here: https://github.com/ag-tcm/annoy-java.

Great!! Thanks for sharing!