def distance_metrix(): scores = [] for i in range(34): score = [] for j in range(34): dist1 = sm.bhatta_distance(id_features[i][1:],id_features[j][1:],12) dist2 = sm.euclidean_distance(id_features_2[i][1:],id_features_2[j][1:]) score.append((dist1+dist2)/2) scores.append(score) return scores
def similarity_sub(a, b, num): return sm.dis_to_sim(sm.bhatta_distance(a, b, num))