Skip to content
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

Update k_nearest_neighbor.py #1

Merged
merged 2 commits into from
Dec 26, 2017
Merged

Update k_nearest_neighbor.py #1

merged 2 commits into from
Dec 26, 2017

Conversation

Ja1r0
Copy link
Contributor

@Ja1r0 Ja1r0 commented Dec 20, 2017

In the no loop situation,the square root is missing when compute the L2 distance.

In the no loop situation,the square root is missing when compute the L2 distance.
@Halfish
Copy link
Owner

Halfish commented Dec 21, 2017

hi,@Ja1r0,这个加上平方根确实是正确的,同时 one_loop 和 no_loop 也是需要一样的做法;不过改不改应该都不影响 kNN 最后的结果,因为开平方操作是单调递增函数,不影响排序。

@Halfish Halfish merged commit d355c0c into Halfish:master Dec 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants