sklearn agglomerative clustering with distance linkage criterion
问题 I usually use scipy.cluster.hierarchical linkage and fcluster functions to get cluster labels. However, the sklearn.cluster.AgglomerativeClustering has the ability to also consider structural information using a connectivity matrix , for example using a knn_graph input, which makes it interesting for my current application. However, I usually assign labels in fcluster by either a 'distance' or 'inconsistent' criterion, and AFAIK the AgglomerativeClustering function in sklearn only has the