Input_features should have length equal to number of features

I am getting error like “input_features should have length equal to number of features (16), got 12”
but i have only 12 categorical values in my input feature .

@birajde Can you please help me with this?

Your input_cols variable is defined incorrectly in the notebook.

You need to use columns attribute of the prices_df dataframe.

Just now realised that i have given the columns twice .

Thank you for the help!

You have made the mistake, because you wrote the columns by hand. Use columns attribute.

inputs_df should have 79 columns overall.

1 Like

ok got it…Thank you!!

Hey @kondojuvaishali98, I would request you to use all columns for the assignment. You can try using few columns and make your model better in an another notebook. Don’t do feature selection in the assignment notebook.

1 Like