I would like to find the euclidian distance between two numpy.ndarray.
lower_boundary = 0
upper_boundary = 1
n = 4 # dimension
sample_size = 3
np.random.seed(9001) # set the seed to yield reproducible results
X2 = np.random.uniform( low=lower_boundary, high=upper_boundary, size=(sample_size, n) )
Y2 = np.random.uniform( low=lower_boundary, high=upper_boundary, size=(sample_size, n) )
print( 'X2: ', X2 )
print( 'Y2: ', Y2 )
- How can i implement this calculation from scratch, by using np.sum and np.sqrt instead of importing euclidean_distances from sklearn.metrics.pairwise
Thanks for all