我安装了sklearn版本0.18.1。我收到这个错误消息。最近重新安装了水蟒。我试着运行这个:
sgd = SGDClassifier(tol=1e3,max_iter=100,penalty='elasticnet',class_weight='balanced',shuffle=True)
pipeline = make_pipeline(cv, tfidf, sgd)
TypeError: init() got an unexpected keyword argument 'tol'
Tags:
正如sgdclassifier所说,这是意料之中的:
所以如果使用0.18.1,那么它可能无法识别它。在
因为它是在版本
0.19
中引入的。这是他们在sklearn的documentation中提到的地方-编辑:
This是您的sklearn版本的文档。在
相关问题 更多 >
编程相关推荐