accuracy = Regressor.score([[y_test,y_pred]])
print(accuracy*100,'%')
TypeError Traceback (most recent call last)
<ipython-input-8-ebadb3426777> in <module>()
----> 1 accuracy = Regressor.score([[y_test,y_pred]])
2 print(accuracy*100,'%')
TypeError: score() missing 1 required positional argument: 'y'
依据:http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LinearRegression.html
您只传递了一个参数([[y\u test,y\u pred]]),请尝试:
^{pr2}$相关问题 更多 >
编程相关推荐