层次聚类python,scipy(dendrogram, linkage,fcluster函数)总算有博文说清楚层次聚类Z矩阵的意义了
这里,我们来解读一下scipy中给出的层次聚类scipy.cluster.hierarchy的示例:importnumpyasnpfromscipy.cluster.hierarchyimportdendrogram,linkage,fclusterfrommatplotlibimportpyplotaspltX=[[i]foriin[2,8,0,4,1,9,9,0]]Z=linkage(X,me