【发布时间】:2012-06-29 05:41:45
【问题描述】:
我正在尝试从 scikit-learn 官方网站运行一个 scikit-learn K-means 示例: http://scikit-learn.org/dev/auto_examples/cluster/plot_cluster_iris.html#example-cluster-plot-cluster-iris-py
我安装了所有库(例如,scipy、numpy、pylab)。但是,在执行代码时,我收到如下错误消息:
Traceback (most recent call last):
File "plot_cluster_iris.py", line 41, in <module>
estimators = {'k_means_iris_3': KMeans(n_clusters=3),
TypeError: __init__() got an unexpected keyword argument 'n_clusters'
这与 scikit-learn 版本有关吗?我正在使用版本。 MAC OS X Lion 上的 0.11。
【问题讨论】:
标签: python scikit-learn