I was trying to run the Sub_file.target = predictions and I got an error: 'Length of values (12079) does not match length of index (5177)
In your model prediction
Ensure you do model.predict(test)
And not model.predict(Train)
12079 is the length of data for the train dataset, so make sure you're doing the right thing by predicting for test dataset.
I predicted using the test
There's something definitely wrong with the predictions variable,
1, Check the length of the prediction variable itself to see if it's 5177
2, Go through your whole code to ensure that you're not changing the prediction variable anywhere else
Len(prediction) is giving me 12079. How do I resolve this please. Help me. Am frustrated already
Maening that you're predicting for train dataset not test dataset. It should be 5177. Take your time and check through your codes from the beggining to make correction.
Thanks. The problem is solved.