Last active
October 2, 2021 21:21
-
-
Save saurbhc/f324fc23ee28828856538ee39baf1ef3 to your computer and use it in GitHub Desktop.
Euclidean Distance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def compute_euclidean_distance(self): | |
return math.sqrt( | |
sum( | |
[(i - j) ** 2 for i, j in zip(self.from_vector_list, self.to_vector_list)] | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment