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

KDTree query() function returning wrong nearest neighbor #253

Open
rimocell opened this issue Mar 22, 2024 · 2 comments
Open

KDTree query() function returning wrong nearest neighbor #253

rimocell opened this issue Mar 22, 2024 · 2 comments
Assignees
Labels

Comments

@rimocell
Copy link

I want to return the nearest neighbor to my data point. However, it is returning the wrong one. I tried returning multiple nearest neighbors and there also seem to be some inconsistencies with the returned list of neighbors.

In the screenshot below, if I return the nearest neighbor, it has distance 8,9. But if I return the two nearest neighbors then it actually returns to me the two nearest ones with distances 2,0 and 3,19.

Screenshot 2024-03-18 at 09 49 11

Also when returning the 3 nearest and the 4 nearest neighbors. On the k=3, the values are wrong

@gyrdym
Copy link
Owner

gyrdym commented Mar 22, 2024

@rimocell thank you for the report, I'll check the behaviour. Seems like there is a bug.

@gyrdym
Copy link
Owner

gyrdym commented Mar 22, 2024

@rimocell btw, could you please share your data?

@gyrdym gyrdym added the bug label Jun 3, 2024
@gyrdym gyrdym self-assigned this Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants