Reputation: 171
I am working on the kNN classification problem for school. What is the formula for calculating the distance from one x y coordinate to another x y coordinate? I just need the algebra, not the code.
Upvotes: 1
Views: 411
Reputation: 1352
You're looking for Euclidean distance in two dimensions
https://en.wikipedia.org/wiki/Euclidean_distance#Two_dimensions
Upvotes: 3