我正在尝试在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)