faiss icon indicating copy to clipboard operation
faiss copied to clipboard

why Spherical by default if the metric is inner_product

Open kittenkaka opened this issue 9 years ago • 3 comments

in file IndexIVF.cpp line 46, why Spherical by default if the metric is inner_product?

kittenkaka avatar Jun 19 '17 10:06 kittenkaka

Hi

We observed that spherical assignment gives better results. This makes sense because otherwise the centroids with a higher norm inherently are assigned to more often, and unbalanced assignments are typically less efficient.

mdouze avatar Jun 19 '17 11:06 mdouze

Hi, But it does't get correct result when I set spherical =true. In 2-IVFFlat.py I set quantizer = faiss.IndexFlatIP(d) and index = faiss.IndexIVFFlat(quantizer, d, nlist) , but the result is quite different with 1-Flat.py

kittenkaka avatar Jun 19 '17 11:06 kittenkaka

Since the metric is different, there is no reason that the results are the same.

mdouze avatar Aug 10 '17 05:08 mdouze