-
Notifications
You must be signed in to change notification settings - Fork 130
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
Is it possible to change the metric let say mahalanobis metric or precomputed one? #8
Comments
Right now, that's not possible. Currently FAISS only supports the L2 and Inner Product (Cosine) metrics - It would be an easy matter however to expose the pre-computed distance matrix - if you were willing to provide a similarity matrix, however this would significantly decrease the performance of the library. To sum it up, we will be adding the ability to pass in your own distance matrix, and support for the Inner Product metric in an upcoming build (once some of the people behind this get back from vacation), but we have no plans to support metrics which are not up-stream in FAISS. |
Is the ability to pass in one's own distance matrix still on the road map? |
Up for the question :-) 👍 |
tsnecuda works by computing approximate nearest neighbors for each of the points in the high dimensional space. It would be easy to add the ability to pass in a sparse nearest neighbors matrix, however it becomes more complicated if you want to extract the nearest neighbors from a pre-computed distance matrix. The algorithm for nearest neighbors in tsnecuda is built on a combination of multiprobing LSH and product quantization - implemented through the FAISS library for GPU nearest neighbors. This means that we can support at most the set of metrics that FAISS can support, without writing custom code to probe for the NN matrix. The next version of tsnecuda will include the L2 metric, as it has been added upstream. See facebookresearch/faiss#848 for a discussion on the upstream progress for distance metrics. |
Thank you for the clarification! |
Is it possible to change the metric let say mahalanobis metric or precomputed one?
thanks,
The text was updated successfully, but these errors were encountered: