Feature importances

Marketing Analytics: Predicting Customer Churn in Python

Mark Peterson

Director of Data Science, Infoblox

Feature importances

  • Scores representing how much each feature contributes to a prediction
  • Effective way to communicate results to stakeholders

 

  • Which features are important drivers of churn?
  • Which features can be removed from the model?
Marketing Analytics: Predicting Customer Churn in Python

Interpretability vs accuracy

  • Different models have different strengths
  • Need to balance prediction accuracy vs. interpretability
Marketing Analytics: Predicting Customer Churn in Python

Random forest feature importances

random_forest = RandomForestClassifier()

random_forest.fit(X_train, y_train)
random_forest.feature_importances_
array([0.02716028 0.02960326 0.13820047 0.0700711  0.03798189 0.04722036
 0.13258838 0.07066312 0.02333901 0.02982636 0.13711014 0.0300661
 0.06351097 0.02860241 0.0382932  0.05200864 0.04375429])
Marketing Analytics: Predicting Customer Churn in Python

Let's practice!

Marketing Analytics: Predicting Customer Churn in Python

Preparing Video For Download...