【问题标题】:Python Agglomerative ClusteringPython 凝聚聚类
【发布时间】:2015-11-09 00:35:50
【问题描述】:

我是集群的新手(在 Python 中使用 sklearn)。我正在尝试使用以下方法导入凝聚聚类:

from sklearn.cluster import AgglomerativeClustering

但我收到以下错误:

from sklearn.cluster import AgglomerativeClustering

ImportError: cannot import name AgglomerativeClustering

我确实从http://scikit-learn.org/ 在我的 UBUNTU 机器上安装了最新版本的 sklearn,但仍然没有运气!!谁能帮我解决这个问题?

【问题讨论】:

  • 你在import sklearn.cluster; print dir(sklearn.cluster)时看到了什么?
  • 您能否解释一下您所说的“打印目录(sklearn.cluster)”是什么意思?我已经在 UBUNTU 上安装了 eclips 并且我有: from sklearn.cluster import AgglomerativeClustering 并且 Iget 在 concole 中出现以下错误: from sklearn.cluster import AgglomerativeClustering ImportError: cannot import name AgglomerativeClustering

标签: python-2.7 hierarchical-clustering


【解决方案1】:

我发布这个有点晚了,但是对于遇到这个错误的其他人来说,你会希望看到这个帖子Why can't I import the AgglomerativeClustering class?

您可能需要升级您的 scikit-learn 版本以使用凝聚聚类功能。

【讨论】:

    猜你喜欢
    • 2014-06-28
    • 2011-12-22
    • 2017-12-03
    • 2022-01-01
    • 2021-07-21
    • 2020-11-30
    • 2016-09-06
    • 2021-12-14
    • 1970-01-01
    相关资源
    最近更新 更多