Advertisement
Guest User

Untitled

a guest
Oct 24th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. import math
  2. def euclideanDistance(instance1, instance2, length):
  3. distance = 0
  4. for x in range(length):
  5. distance += pow((instance1[x] - instance2[x]), 2)
  6. return math.sqrt(distance)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement