【发布时间】:2014-01-27 14:43:52
【问题描述】:
我有一个用heatmap 函数绘制的距离矩阵。热图函数将数据聚类到组中。我想将它们聚集到同一个组中。
参数是:
heatmap(distanceMatrix, symm = T)
数据组在矩阵的诊断中很明显。
类似这样的:
其实我是在找组数。之后我可以在 R 中使用 hcluste 和 cut 对数据进行分区。
【问题讨论】:
标签: r cluster-analysis heatmap
我有一个用heatmap 函数绘制的距离矩阵。热图函数将数据聚类到组中。我想将它们聚集到同一个组中。
参数是:
heatmap(distanceMatrix, symm = T)
数据组在矩阵的诊断中很明显。
类似这样的:
其实我是在找组数。之后我可以在 R 中使用 hcluste 和 cut 对数据进行分区。
【问题讨论】:
标签: r cluster-analysis heatmap
你看过函数的帮助文件(`?heatmap)吗?请参阅以下论点。
distfun
function used to compute the distance (dissimilarity) between both rows and columns. Defaults to dist.
hclustfun
function used to compute the hierarchical clustering when Rowv or Colv are not dendrograms. Defaults to hclust. Should take as argument a result of distfun and return an object to which as.dendrogram can be applied.
【讨论】:
library(NbClust) 包解决了这个问题
“NbClust:确定集群数量的指标检查:NbClust 包”
【讨论】: