I am analysing and prediction 2023 Cricket World Cup based on previous given dataset.

This is Exploratary analysis: enter image description here

Feature selection and Training model: enter image description here

Applying Random forest classifier algorithm: enter image description here

Evaluating the best model on test data: enter image description here

Interpret the model results: enter image description here

ValueError: X has 54 features, but DecisionTreeClassifier is expecting 53 features as input.

My Attempt: I tried to use from sklearn import * but it is not working. I also tried to drop columns from pred_set but not working. Can you please hint me what should fix here in order to Interpret the model results !?


1 Answer 1


Where you do pred_set.drop(["Winner"], axis=1) you need to add inPlace=True, or assign to a new dataframe, otherwise nothing happens.

pred_set.drop(["Winner"], axis=1, inplace=True)
  • $\begingroup$ Nice! It works!! $\endgroup$ Commented Oct 26, 2023 at 11:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.