Use custom centroids in IVFFlat #4007
-
Hi, I wonder if there's any interface we can use to construct IVF clusters with custom centroids vectors? So instead of initialize the IVF index and add corpus vectors for train (which construct corpus centroids), can we manually designate some vectors as the centroids and update the clustering accordingly? Seemingly this could be achieved by constructing a IndexFlat clusters on the custom centroids as quantizer, and manually construct But I wonder if there's a prebuild interface, which might be faster? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I am not sure if this is the correct way of doing this, but I have been adding the custom centroids into the quantizer, and then initialize the IVF index with this "trained" quantizer, as in the following:
|
Beta Was this translation helpful? Give feedback.
-
Sure that works! |
Beta Was this translation helpful? Give feedback.
I am not sure if this is the correct way of doing this, but I have been adding the custom centroids into the quantizer, and then initialize the IVF index with this "trained" quantizer, as in the following: