knn example #10044
knn example
#10044
-
Hi, Using the knn example from pool.knn, i.e.
I got
though I was expecting
Do I err? |
Beta Was this translation helpful? Give feedback.
Answered by
songsong0425
Feb 28, 2025
Replies: 1 comment 1 reply
-
What's the meaning of your expectation? |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ldv1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What's the meaning of your expectation?
To my knowledge, knn returns the 2 nearest neighbors from y to x when [0, 0, 1, 1] means the node with the y label and [0, 1, 2, 3] means the x nodes. You can simply check the process by drawing the nodes on the coordinate.