what is the meaning of the return values of the scipy.cluster.hierarchy.linkage?
问题 Let assume that we have X matrix as follows: [[9 0] [1 4] [2 3] [8 5]] Then, from scipy.cluster.hierarchy import linkage Z = linkage(X, method="ward") print(Z) The returning matrix is follows: [[ 1. 2. 1.41421356 2. ] [ 0. 3. 5.09901951 2. ] [ 4. 5. 10. 4. ]] What is the meaning of the returning values? 回答1: Although this has been answered before, it was a "read the docs" answer. I think it is useful to explain the docs a bit. From the docs, we read that: An (n−1) by 4 matrix Z is returned.