TypeError:score()缺少1个必需的位置参数:“y”

2024-10-02 22:23:03 发布

您现在位置:Python中文网/ 问答频道 /正文

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'

Tags: testmostinputipythoncalllastscoreprint