我试图运行scikit学习的K-means例如从scikit学习的官方网站: http://scikit-learn.org/dev/auto_examples/cluster/plot_cluster_iris.html#example-cluster-plot-cluster-iris-py错误而执行scikit学习的K-means例如
我被安装了所有的库(例如,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版本有关?我正在使用ver。在MAC OS X Lion上为0.11。