Skip to content

knn example #10044

Answered by songsong0425
ldv1 asked this question in Q&A
Feb 18, 2025 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ldv1
Comment options

Answer selected by ldv1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants