Skip to content

KDTree query() function returning wrong nearest neighbor #253

Open
@rimocell

Description

@rimocell

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

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions