【问题标题】:Can i get features of the clusters using hierarchical clustering - numpy我可以使用层次聚类来获取集群的特征吗 - numpy
【发布时间】:2013-01-29 19:10:13
【问题描述】:

我正在尝试对 m*n 数组进行层次聚类。

  1. 输入数组:500 * 1000(1000 个特征,500 个观察值)
  2. 使用自定义的 pdist 函数计算距离矩阵
  3. 将此距离矩阵提供给链接函数: clusters = sch.linkage(distanceMatrix,'single')
  4. 形成扁平簇: fc = sch.fcluster(clusters,cutoff,'距离')

这给了我一些集群(大约 80 个,使用截止值 6.0)。 现在,无论如何,我也可以获得与每个集群对应的 1000 个特征吗? (就像我们使用 K-means 聚类获得质心的特征一样)。

【问题讨论】:

    标签: python numpy cluster-analysis data-mining hierarchical


    【解决方案1】:

    层次聚类中的聚类(或者除了 k-means 和 Gaussian Mixture EM 之外的几乎任何东西,仅限于“球形” - 实际上:凸 - 聚类)确实不一定有合理的手段。 p>

    因为它们允许非球形集群。这实际上是一个功能......

    https://en.wikipedia.org/wiki/Cluster_analysis#Connectivity_based_clustering_.28hierarchical_clustering.29

    查看标题为“链接聚类示例”的右图。在这个“香蕉”示例中,集群有什么好处? 质心甚至可能不在集群中!

    请注意,如果需要,您仍然可以自己计算质心。由于聚类算法不需要质心,显然它不会自动为您计算它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-02-17
      • 2018-06-03
      • 2015-03-28
      • 2014-07-21
      • 2013-11-22
      • 1970-01-01
      • 2020-06-06
      相关资源
      最近更新 更多