【发布时间】:2020-11-13 13:39:13
【问题描述】:
我正在尝试通过 scikit 模块绘制线性回归,但它给出了错误的回归。
x=b[['year']]
y=b['pf_score']
l=LinearRegression().fit(x,y)
plt.plot(x,y,'bx')
plt.plot(x,l.coef_*x+l.intercept_,'r-')
plt.show()
【问题讨论】:
标签: python machine-learning scikit-learn linear-regression