问题描述
我有两个树状图,我希望将它们相互比较,以找出它们的相似度".但我不知道有什么方法可以这样做(更不用说在 R 中实现它的代码了).
I have two dendrograms which I wish to compare to each other in order to find out how "similar" they are. But I don't know of any method to do so (let alone a code to implement it, say, in R).
有线索吗?
更新 (2014-09-13):
UPDATE (2014-09-13):
自从问这个问题后,我写了一个名为 dendextend 的 R 包,用于树状图的可视化、操作和比较.该软件包位于 CRAN 上,并带有 详细小插图.它包括cor_cophenetic
、cor_bakers_gamma
和Bk
/Bk_plot
等函数.以及用于直观比较两棵树的 tanglegram
函数.
Since asking this question, I have written an R package called dendextend, for the visualization, manipulation and comparison of dendrogram. This package is on CRAN and comes with a detailed vignette. It includes functions such as cor_cophenetic
, cor_bakers_gamma
and Bk
/ Bk_plot
. As well as a tanglegram
function for visually comparing two trees.
推荐答案
比较树状图和比较层次聚类并不完全一样,因为前者包括分支的长度以及分裂,但我也认为这是一个很好的开始.我建议你阅读 E. B. Fowlkes &C. L. 锦葵 (1983).一种比较两个层次聚类的方法".美国统计协会杂志 78 (383):553–584 (链接).
Comparing dendrograms is not quite the same as comparing hierarchical clusterings, because the former includes the lengths of branches as well as the splits, but I also think that's a good start. I would suggest you read E. B. Fowlkes & C. L. Mallows (1983). "A Method for Comparing Two Hierarchical Clusterings". Journal of the American Statistical Association 78 (383): 553–584 (link).
他们的方法基于在每个级别k砍树,得到一个度量Bk,将分组比较为k个簇,并且然后检查 Bk 与 k 图.度量Bk 是基于查看对象对并查看它们是否属于同一个集群.
Their approach is based on cutting the trees at each level k, getting a measure Bk that compares the groupings into k clusters, and then examining the Bk vs k plots. The measure Bk is based upon looking at pairs of objects and seeing whether they fall into the same cluster or not.
我确信人们可以基于这种方法编写代码,但首先我们需要知道树状图在 R 中是如何表示的.
I am sure that one can write code based on this method, but first we would need to know how the dendrograms are represented in R.
这篇关于你如何比较“相似性"?在两个树状图之间(在 R 中)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!