使用回归进行预测

时间:2019-11-24 06:41:08

标签: python-3.x

我正在使用此代码进行预测,但收到此错误:ValueError: too many values to unpack (expected 2)

代码如下:

from sklearn.datasets import make_regression
#Xnew, _ = make_regression(n_samples=5,n_features=7,shuffle=True,noise=0,random_state=1)
Xnew, _ =  pd.read_csv('Admission_Predict.csv')
#make a prediction
ynew = regr.predict(Xnew)
#show the inputs and predicted outputs
for i in range(len(Xnew)).items():
 print("X=%s, Predicted=%s" %(Xnew,ynew))

0 个答案:

没有答案