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

Clarify nearest_neighbors() method #133

Open
JosiahParry opened this issue Sep 3, 2023 · 2 comments
Open

Clarify nearest_neighbors() method #133

JosiahParry opened this issue Sep 3, 2023 · 2 comments

Comments

@JosiahParry
Copy link

/// All returned values will have the exact same distance from the given query point.

The nearest_neighbors() method seems like it can be usefull for KNN however it is not immediately clear in the docs how it works. Does it return a vector of all neighboring points sorted by distance?

Can this method be clarified further?

@adamreichold
Copy link
Member

adamreichold commented Sep 3, 2023

I think you are looking for nearest_neighbor_iter. nearest_neighbors is meant only for when there is no single nearest neighbour but multiple objects have exactly the same distance as quoted from the documentation.

@JosiahParry
Copy link
Author

Thanks for the response @adamreichold! That might be what I need. I still think the documentation can be improved, howevre.

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