Closed hminle closed 6 years ago
Here it seems it is returning the square of the L2 distance. cc @mdouze
So in general, our L2 indexes return the square (L2) distance.
@beauby but I calculate the distance directly, and the results is the same with kd-tree (scikit), I don't know why faiss generates the different distance?
@hminle It is just squared. If you take the square root of the distances returned by Faiss, you will get the same value as with the kd-tree.
Summary
Hello guys, when the index return distance, is that the L2 distance? Because I also build a KD-tree with scikit learn, it returns L2 distances. But the two distance is totally different.
Running on :
Reproduction instructions
Use sample database of (10, 128), search vector (1, 128) to test distance between Kd-tree (scikit-learn) and faiss