ValueError:形状(10500,1)和(210,210)不对齐:1(dim 1)!= 210(dim 0)

时间:2019-07-10 11:28:08

标签: python-3.x jupyter-notebook

我正在尝试在Jupyter笔记本中使用Kaggle练习代码。但是我在下面面临错误。

from sklearn.linear_model import LinearRegression
reg = LinearRegression()
predict_space = np.linspace(min(x),max(x)).reshape(-1,1)
reg.fit(x,y)
Predicted =  reg.predict(predict_space)

错误:ValueError:(10500,1)和(210,210)形状未对齐:1(dim 1)!= 210(dim 0)

0 个答案:

没有答案