ValueError
Data · 23 Sep 2020, 13:31 · 5

Could someone here please find solution for this value error as I wanted to submit my prediction:

"array length 16800 does not match index length 24000".

Note: test_size is 30%.

Discussion 5 answers

Good day. I'm assuming you're trying to submit the prediction on the test data in your you got from your train_test_split. You shouldn't. That's more like a validation data set to add an extra layer of testing. Instead, after you are comfortable with your models performance on this validation data set, make predictions on the test.csv data and submit that.

23 Sep 2020, 13:36
Upvotes 0

Yes I used:

Submission = pd.DataFrame({'Applicant_ID': test['Applicant_ID'], 'default_status': y_pred})

23 Sep 2020, 14:26
Upvotes 0

Alright then. Just make sure your y_pred is based on the data in test.csv and you're good to go.

23 Sep 2020, 14:49
Upvotes 0
User avatar
10 Academy

And also be sure you are using the second Predict proba too

OK. Thank you all.

23 Sep 2020, 16:13
Upvotes 0