简体   繁体   English

从生成的树状图中提取群集信息

[英]extract cluster information from the generated dendrogram

In the generated dendrogram graph, the column marks the distance cutoff. 在生成的树状图中,该列标记了距离截止。 Is there a way to get the cluster information for each of these distance cutoffs. 有没有一种方法可以获取每个距离截止点的群集信息。 In specific, how to do that in Matlab or in R? 具体来说,如何在Matlab或R中做到这一点?

If X is your dataset, then in MATLAB the command 如果X是您的数据集,则在MATLAB中,命令

Z = linkage(X);

(requires Statistics Toolbox) will carry out hierarchical cluster analysis for you. (需要统计工具箱)将为您执行层次聚类分析。 Z is an (m-1)-by-3 matrix, where m is the number of rows of X . Z是一个(m-1)×3的矩阵,其中m是X的行数。 The first and second columns of Z give you the indices of the data points or cluster centroids that have been merged together at each node of the dendrogram, and the third column gives you the distance cutoff at that node. Z的第一和第二列为您提供了在树状图的每个节点处合并在一起的数据点或聚类质心的索引,第三列为您提供了该节点处的距离截止。

Is that what you are asking for? 这就是您要的吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM