scipy.cluster.hierarchy: labels seems not in the right order, and confused by the value of the vertical axes
问题 I know that scipy.cluster.hierarchy focused on dealing with the distance matrix. But now I have a similarity matrix... After I plot it by using Dendrogram, something weird just happens. Here is the code: similarityMatrix = np.array(([1,0.75,0.75,0,0,0,0], [0.75,1,1,0.25,0,0,0], [0.75,1,1,0.25,0,0,0], [0,0.25,0.25,1,0.25,0.25,0], [0,0,0,0.25,1,1,0.75], [0,0,0,0.25,1,1,0.75], [0,0,0,0,0.75,0.75,1])) here is the linkage method Z_sim = sch.linkage(similarityMatrix) plt.figure(1) plt.title(