import scipy.spatial.distance as dist
Y=[[1,2,3],[2,3,4]]
Q=dist.pdist(Y,'jaccard')
print Q
The following snippet gives jaccard distance as 1
while it should be 0.5
.
On the other hand if Y=[[1,2,3],[4,2,3]]
i.e if ordering is changed output is 0.33. But jaccard distance is independent of order of elements. Can you suggest how to resolve this issue here?