【问题标题】:Hierarchical Cluster using dissimilarity matrix R使用相异矩阵 R 的层次聚类
【发布时间】: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- 我如何将它链接到我的源数据,因为所有结果都基于相异矩阵。

【问题讨论】:

  • 读过一本关于聚类方法的书?或查看this linkthis 以帮助您入门。
  • 非常感谢,我意识到这个情节很难理解,所以我使用“cutree”函数来获取集群列表而不是树状图。

标签: r distance hierarchical-clustering r-daisy


【解决方案1】:

请看- https://stats.stackexchange.com/questions/130974/how-to-use-both-binary-and-continuous-variables-together-in-clustering

它解释了如何在 hclust 中使用 gower 相异矩阵。希望这会有所帮助!

【讨论】:

    猜你喜欢
    • 2012-09-05
    • 2018-04-29
    • 2018-02-15
    • 2013-04-01
    • 2017-11-23
    • 2016-08-21
    • 2018-04-10
    • 2015-10-17
    • 2013-09-17
    相关资源
    最近更新 更多