Computes the Canberra distance between two n-vectors u and v, which is defined as
d(u,v) = \sum_i \frac{|u_i-v_i|} {|u_i|+|v_i|}.
Parameters : | u : ndarray
v : ndarray
|
---|---|
Returns : | d : double
|
Notes
When u[i] and v[i] are 0 for given i, then the fraction 0/0 = 0 is used in the calculation.