clw*_*wen 2 python scikit-learn
我正在尝试从scikit-learn官方网站上运行scikit-learn K-means示例:http://scikit-learn.org/dev/auto_examples/cluster/plot_cluster_iris.html#example-cluster-plot-cluster-iris -吡咯
我安装了所有库(例如,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'
Run Code Online (Sandbox Code Playgroud)
这与scikit-learn版本有关吗?我正在使用ver.MAC OS X Lion上的0.11.