-
Notifications
You must be signed in to change notification settings - Fork 3
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
wrong answer #18
Comments
can you run this again without the |
same answer |
in your original code |
Sorry |
Unfortunately I don't think I can help you because this doesn't appear to be an interface problem (Neighborhoods.jl only provodes the interface). What I would recomend is that you reproduce this using NearestNeighbors.jl directly, and open an issue there. The developers will have better chances understanding what is wrong. |
Oh, I see, Thanks a lot! |
So, Im not sure what is happening, but I try to use the following stuff
using Neighborhood
using Distances
queryPoint = [2.0,1.0]
dataX = [0.5 0.5; 1.5 0.5]
tree = Neighborhood.searchstructure(KDTree,dataX,Euclidean(),reorder = false)
idx,ds = Neighborhood.knn(tree, queryPoint, nonearpoints)
And I got the answer
idx,ds = Neighborhood.knn(tree, queryPoint, nonearpoints)
([1, 2], [1.5811388300841898, 1.5811388300841898])
that is clearly whong, because if I check the distance
Euclidean()(queryPoint ,dataX[2,:])
I got the answer: 0.7071067811865476
What am I doing wrong here? Please help
The text was updated successfully, but these errors were encountered: