Exercise

Can you adjust the model or parameters to improve accuracy?

You just saw a substantial improvement in accuracy by swapping out the model. Pipelines are amazing!

Can you make it better? Try changing the parameter n_estimators of RandomForestClassifier(), whose default value is 10, to 15.

Instructions

100 XP
  • Import the RandomForestClassifier from sklearn.ensemble.
  • Add a RandomForestClassifier() step with n_estimators=15 to the pipeline with a name of 'clf'.
  • Hit submit to fit the pipeline to the training data and compute its accuracy.