Skip to content
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 ball tree work with any metric? #162

Open
EssamWisam opened this issue Aug 8, 2023 · 2 comments
Open

Does ball tree work with any metric? #162

EssamWisam opened this issue Aug 8, 2023 · 2 comments

Comments

@EssamWisam
Copy link

EssamWisam commented Aug 8, 2023

It says on the Github readme that ball tree works with any metric; I was using it with a custom metric over discrete vectors (like hamming distance) and noticed that it may be generating centroids that are not discrete; thus, such centroid may be equidistant to all points in hamming space.

@KristofferC
Copy link
Owner

As long as the triangle inequality is fulfilled it should work in theory. Would have to look at a specific example to say anything more.

@EssamWisam
Copy link
Author

It's been some time for me to remember the details of what I was doing but I think was pointing out that my understanding suggests that ball tree doesn't necessarily work for discrete metrics; however, it is mentioned in the README that it works for all metrics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants