I am currently using SciPyto compute Euclidean distance
dis = scipy.spatial.distance.euclidean(A,B)
Where; A, B are 5-bit bit vectors. Now it works fine, but if I add weights for each dimension, can I use scipy?
What I have now: sqrt((a1-b1)^2 + (a2-b2)^2 +...+ (a5-b5)^2)
I want: sqrt(w1(a1-b1)^2 + w2(a2-b2)^2 +...+ w5(a5-b5)^2)use scipy or numpy or any other effective way to do this.
thank
source
share