Pairwise dissimilarity measure...? Have a look at `sklearn.metrics.*`.