please help me sir
Predictions
y_test = []
for i in range (X.shape[0]):
pred = hypothesis(X[i],theta)
y_test.append(pred)
y_test = np.array(y_test)
y_test = pd.DataFrame(y_test,columns=[“target”])
please help me sir
y_test = []
for i in range (X.shape[0]):
pred = hypothesis(X[i],theta)
y_test.append(pred)
y_test = np.array(y_test)
y_test = pd.DataFrame(y_test,columns=[“target”])
Hey @dhiru96027, you can do it like this,
y_test = []
for i in range (X.shape[0]):
pred = hypothesis(X[i],theta)
y_test.append([i,pred])
y_test = np.array(y_test)
y_test = pd.DataFrame(y_test,columns=["id",“target”])
Hope this resolved your doubt.
Plz mark the doubt as resolved in my doubts section. 
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
why gives error can check my code sir
after submission compiler give error but when i was check r2 score they give 96% so coding block gives error please hepl me sir
mujhe lg raha hai na sir kewal 401 test ko check kr raha but mere csv file mai 1601 hai
Hey @dhiru96027, you have to submit predictions for, ‘test.csv’ file and not on xtrain file. So first of all load the ‘test.csv’ in test folder. Make predictions, vertify the format from sample submission.csv and than submit it.
can you give me solution sir
Hey @dhiru96027, here is the reference notebook,
https://drive.google.com/file/d/1iPz0jysQt9llxADMuzaqEVwM2OWEG3J0/view?usp=sharing
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.