Jacob Ricci
Jacob Ricci

Reputation: 171

K nearest neighbor distance

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

Answers (1)

FriedSaucePots
FriedSaucePots

Reputation: 1352

You're looking for Euclidean distance in two dimensions

https://en.wikipedia.org/wiki/Euclidean_distance#Two_dimensions

Upvotes: 3

Related Questions