基于相异矩阵R的层次聚类

基于相异矩阵R的层次聚类,r,distance,hierarchical-clustering,r-daisy,R,Distance,Hierarchical Clustering,R Daisy,我有混合数据类型矩阵数据字符串大小(947 x 41),其中包含数字和分类属性 我使用daisy()函数和Rstudio中的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中使用gower相异矩阵

我有混合数据类型矩阵数据字符串大小(947 x 41),其中包含数字和分类属性

我使用daisy()函数和Rstudio中的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中使用gower相异矩阵。希望这有帮助

读一本关于聚类方法的书?非常感谢,我意识到要理解这个图会很混乱,所以我使用了“cutree”函数来获取集群列表,而不是树形图。
# 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)