【发布时间】:2015-12-14 12:32:39
【问题描述】:
我有混合数据类型矩阵 Data_string 大小 (947 x 41),包含数字和分类属性。
我在 Rstudio 中使用 daisy() 函数和 Gower 距离测量生成了一个距离矩阵 (947 x 947)。
d <- daisy(Data_String, metric = "gower", stand = FALSE,type = list(symm = c("V1","V13") , asymm = c("V8","V9","V10")))
我使用相异矩阵 (d) 应用了层次聚类。
# hclust
hc <- hclust(d, method="complete")
plot(hc)
rect.hclust(hc, 4)
cut <- cutree(hc, k = 1:5)
View(cut)
#Diana
d_as <- as.matrix(d)
DianaCluster <- diana(d_as, diss = TRUE, keep.diss = TRUE)
print(DianaCluster)
plot(DianaCluster)
以下是我的地块。
** 注意:我没有足够的声望点,所以无法上传图片。
我很难理解结果,有人可以请吗
1- 建议我可以在 R 中应用的任何解决方案,以简化对结果的理解。
或
2- 我如何将它链接到我的源数据,因为所有结果都基于相异矩阵。
【问题讨论】:
标签: r distance hierarchical-clustering r-daisy