1. Learn
  2. /
  3. Courses
  4. /
  5. Marketing Analytics: Predicting Customer Churn in Python

Exercise

Tuning other hyperparameters

The power of GridSearchCV really comes into play when you're tuning multiple hyperparameters, as then the algorithm tries out all possible combinations of hyperparameters to identify the best combination. Here, you'll tune the following random forest hyperparameters:

Hyperparameter Purpose
criterion Quality of Split
max_features Number of features for best split
max_depth Max depth of tree
bootstrap Whether Bootstrap samples are used

The hyperparameter grid has been specified for you, along with a random forest classifier called clf.

Instructions 1/3

undefined XP
    1
    2
    3
  • Instantiate the GridSearchCV object using clf and param_grid.