faiss icon indicating copy to clipboard operation
faiss copied to clipboard

IVFPQ/PQ search returns **squared** L2 distances

Open billkle1n opened this issue 9 years ago • 2 comments

I noticed that when using the faiss.METRIC_L2, the L2 distances returned are squared. It's not necessarily a bug but it should at least be a bit better documented (I only found one mention in the wiki of this) as I was intuitively expecting the function to return L2 distances. I think most people using the library would make that assumption too.

billkle1n avatar Aug 29 '17 20:08 billkle1n

Hi Yes that is right, it is to avoid extracting a square root. Feel free to suggest where the doc should be improved.

mdouze avatar Aug 30 '17 05:08 mdouze

Thanks. I'm not exactly sure but now that it's in the issues it is a bit more searchable.

billkle1n avatar Aug 31 '17 02:08 billkle1n