-
Notifications
You must be signed in to change notification settings - Fork 8
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
KNN classifier labels #186
Comments
Hey @manisci thanks for pointing this out, glad to see another user. Will take a look! |
Fixed in #187. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Thank you for the great documentation and scripts. I think there is something missing in the method "_find_nearest" in the class "KNNClassifier". I will try to illustrate it with an example, let's assume the labels for the closest neighbors, sorted by closeness is nearest_label = [1 0 0 0 1] and we are using uniform distances so nearest_distance is [1 1 1 1 1]. We expect the prediction to be 0, since there are 3 zeros, but using the code in "_find_nearest", we would get 1.
In particular, I don't understand the reasoning for this line
I believe this should be replaced by
This would give the expected result of 0.
The text was updated successfully, but these errors were encountered: