-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does kmeans support INNER_PRODUCT distance? #2363
Comments
Inner product is supported. |
Hi - I am not sure this is the right place to ask this, but I would like to know the exact place in the source code where the k means clustering is happening which is using inner product as a similarity metric rather than the Euclidean L2 distance. --Megh |
Yes the arithmetic mean is used to compute centroids. Indeed the decreasing mean squared error guarantee does not hold with anything else than L2 assignment. However the inner product assignment is useful, especially in combination with the L2 normalization of the centroids after each iteration. |
Could you briefly describe how we can assign do inner product assignment in the python interface?
|
Hi, I want to know if the
faiss.IndexIVFFlat
index is using the kmeans method during training, can the distance calculation only use L2? Is it possible to use INNER_PRODUCT?Can I use INNER_PRODUCT as distance for kmeans?
I want to implement it this way, is this correct?
At the same time I also want to know what does
quantizer
andfaiss.METRIC_INNER_PRODUCT
mean here?Looking forward to your reply!
The text was updated successfully, but these errors were encountered: