Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

adding nan_euclidean metric #3355

Closed
PolarBean opened this issue Apr 8, 2024 · 3 comments
Closed

adding nan_euclidean metric #3355

PolarBean opened this issue Apr 8, 2024 · 3 comments

Comments

@PolarBean
Copy link

Summary

Sklearn has recently added support for the nan_euclidean as detailed in this issue scikit-learn/scikit-learn#25319

Is it possible this will be added to faiss in the future? thank you.

@mdouze
Copy link
Contributor

mdouze commented Apr 11, 2024

We can make an enhancement of it.
For new metrics, the first stage is to support them for brute force search in

https://github.com/facebookresearch/faiss/blob/main/faiss/utils/extra_distances-inl.h

this will enable them for FlatCodes search and HNSW search.

facebook-github-bot pushed a commit that referenced this issue May 6, 2024
Summary:
#3355

A couple open questions:
- Given L2 was squared, I figured I would leave this one as squared as well?
- Also, wasn't sure if we wanted to return nan when present == 0 or -1?

Differential Revision: D57017608
asadoughi pushed a commit that referenced this issue May 6, 2024
Summary:

#3355

A couple open questions:
- Given L2 was squared, I figured I would leave this one as squared as well?
- Also, wasn't sure if we wanted to return nan when present == 0 or -1?

Differential Revision: D57017608
facebook-github-bot pushed a commit that referenced this issue May 15, 2024
Summary:

#3355

A couple open questions:
- Given L2 was squared, I figured I would leave this one as squared as well?
- Also, wasn't sure if we wanted to return nan when present == 0 or -1?

Reviewed By: mdouze

Differential Revision: D57017608
facebook-github-bot pushed a commit that referenced this issue May 15, 2024
Summary:

#3355

A couple open questions:
- Given L2 was squared, I figured I would leave this one as squared as well?
- Also, wasn't sure if we wanted to return nan when present == 0 or -1?

Reviewed By: mdouze

Differential Revision: D57017608
asadoughi pushed a commit that referenced this issue May 15, 2024
Summary:

#3355

A couple open questions:
- Given L2 was squared, I figured I would leave this one as squared as well?
- Also, wasn't sure if we wanted to return nan when present == 0 or -1?

Reviewed By: mdouze

Differential Revision: D57017608
facebook-github-bot pushed a commit that referenced this issue May 16, 2024
Summary:
Pull Request resolved: #3414

#3355

A couple open questions:
- Given L2 was squared, I figured I would leave this one as squared as well?
- Also, wasn't sure if we wanted to return nan when present == 0 or -1?

Reviewed By: mdouze

Differential Revision: D57017608

fbshipit-source-id: ba14458b92c8b055f3bf2a871565175935c8333a
@MarcYin
Copy link

MarcYin commented Jun 3, 2024

Is this going to be implemented for the gpu case?

@asadoughi
Copy link
Contributor

CPU implementation of NaNEuclidean is complete. GPU implementation of NaNEuclidean is not currently prioritized. If you would like NanEuclidean on GPU, please file another issue and provide details of your use case.

abhinavdangeti pushed a commit to blevesearch/faiss that referenced this issue Jul 12, 2024
Summary:
Pull Request resolved: facebookresearch#3414

facebookresearch#3355

A couple open questions:
- Given L2 was squared, I figured I would leave this one as squared as well?
- Also, wasn't sure if we wanted to return nan when present == 0 or -1?

Reviewed By: mdouze

Differential Revision: D57017608

fbshipit-source-id: ba14458b92c8b055f3bf2a871565175935c8333a
aalekhpatel07 pushed a commit to aalekhpatel07/faiss that referenced this issue Oct 17, 2024
Summary:
Pull Request resolved: facebookresearch#3414

facebookresearch#3355

A couple open questions:
- Given L2 was squared, I figured I would leave this one as squared as well?
- Also, wasn't sure if we wanted to return nan when present == 0 or -1?

Reviewed By: mdouze

Differential Revision: D57017608

fbshipit-source-id: ba14458b92c8b055f3bf2a871565175935c8333a
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

4 participants