我正在使用此代码进行预测,但收到此错误: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))