def distance(a,b):
return scipy.spatial.distance.cosine(a,b) # ya incluye el 1-cos(ab)
#return sum(pow(a[i]-b[i],2) for i in range(len(b))) #euclidean norm
#pearson correlation in negative so lower is better
#return 1- dot(norm(a),norm(b))
#tanimoto distance
#return 1 - dot(a,b)/(dot(a,a) + dot(b,b) - dot(a,b))
#return sci.kendalltau(a,b) #kendall tau
# Load the benchmark
评论列表
文章目录