Spaces:
Sleeping
Sleeping
File size: 429 Bytes
3cab2dd c2687ce 3cab2dd 0e83192 3cab2dd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import numpy as np
# right now I am not using this function
# maybe get rid of it or change it to how we
# use it in our distance calculations
def euclidean(
point: np.array,
data: np.array,
):
"""
Computed the euclidean distance
between a point and the rest
of the dataset
point dims: (m,)
data dims: (n, m)
output dims: (n,)
"""
return np.sqrt(np.sum((point - data)**2), aixs=1)
|