我一直在努力阅读 Vanderplass 的书,现在我已经被困在这个牢房里好几天了:
from sklearn.model_selection import cross_val_score
cross_val_score(model, X, y, cv=5)
from sklearn.model_selection import LeaveOneOut
scores = cross_val_score(model, X, y, cv=LeaveOneOut(len(X)))
scores
TypeError Traceback (most recent call last)
<. ipython-input-78-029fa0c72898> in <module>
1 from sklearn.model_selection import LeaveOneOut
----> 2 scores = cross_val_score(model, X, y, cv=LeaveOneOut(len(X)))
3 scores
TypeError: LeaveOneOut() takes no arguments
import sklearn
sklearn.__version__
0.22.1'
在此先感谢您的帮助!卡梅伦
慕容708150
收到一只叮咚
相关分类