Data:
There are 10127 observations in this data set.
Predicting customer attrition
Using 20 different predictors
Created a new binary variable, Attrition_Flag by classifying
observations that are predicted to stay = 0 and observations that are
predicted to leave = 1.
Split the data (10127 observations), into training and validation
datasets (70%/30% , 7137/2990).
Used random forest to create multiple decision trees with the
data
Used variable importance to create a graph to show what variables
are the most important in predicting customer attrition.
## Attrited Customer Existing Customer
## Customer_Age 5.209985e-03 6.094077e-03
## Gender 7.313003e-03 1.050486e-03
## Dependent_count 8.890636e-04 8.196618e-04
## Education_Level -3.731033e-04 7.107129e-05
## Marital_Status -4.743139e-05 9.398317e-04
## Income_Category 1.472442e-03 5.298416e-04
## Card_Category 1.613177e-04 2.556012e-04
## Months_on_book 3.570180e-03 2.290269e-03
## Total_Relationship_Count 2.606469e-02 2.888278e-02
## Months_Inactive_12_mon 2.732083e-02 7.274292e-04
## Contacts_Count_12_mon 1.387470e-02 2.967741e-03
## Credit_Limit 1.612998e-02 1.624175e-02
## Total_Revolving_Bal 6.787425e-02 4.908643e-02
## Avg_Open_To_Buy 1.733587e-02 1.511753e-02
## Total_Amt_Chng_Q4_Q1 2.983933e-02 6.599926e-03
## Total_Trans_Amt 1.383110e-01 9.154042e-02
## Total_Trans_Ct 2.341558e-01 9.172821e-02
## Total_Ct_Chng_Q4_Q1 7.547071e-02 1.301618e-02
## Avg_Utilization_Ratio 3.346788e-03 4.282685e-02
## MeanDecreaseAccuracy MeanDecreaseGini
## Customer_Age 5.952204e-03 67.721214
## Gender 2.053355e-03 18.069709
## Dependent_count 8.330205e-04 24.588289
## Education_Level 1.388215e-06 21.780988
## Marital_Status 7.823934e-04 17.076899
## Income_Category 6.797281e-04 21.518866
## Card_Category 2.401003e-04 4.815106
## Months_on_book 2.494116e-03 49.250601
## Total_Relationship_Count 2.842153e-02 133.535542
## Months_Inactive_12_mon 4.986729e-03 43.963740
## Contacts_Count_12_mon 4.711278e-03 51.677818
## Credit_Limit 1.623010e-02 64.893698
## Total_Revolving_Bal 5.206934e-02 209.671243
## Avg_Open_To_Buy 1.548509e-02 62.401374
## Total_Amt_Chng_Q4_Q1 1.031662e-02 113.757505
## Total_Trans_Amt 9.902120e-02 373.709407
## Total_Trans_Ct 1.145100e-01 325.790686
## Total_Ct_Chng_Q4_Q1 2.300351e-02 198.494462
## Avg_Utilization_Ratio 3.650621e-02 122.768449
Graph:

The model is 93.6% correct when it comes to predicting attired
customers
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 2990
##
##
## | val$predicted_Attrition_Flag
## val$Attrition_Flag | Attrited Customer | Existing Customer | Row Total |
## -------------------|-------------------|-------------------|-------------------|
## Attrited Customer | 392 | 90 | 482 |
## | 1558.549 | 253.999 | |
## | 0.813 | 0.187 | 0.161 |
## | 0.936 | 0.035 | |
## | 0.131 | 0.030 | |
## -------------------|-------------------|-------------------|-------------------|
## Existing Customer | 27 | 2481 | 2508 |
## | 299.530 | 48.815 | |
## | 0.011 | 0.989 | 0.839 |
## | 0.064 | 0.965 | |
## | 0.009 | 0.830 | |
## -------------------|-------------------|-------------------|-------------------|
## Column Total | 419 | 2571 | 2990 |
## | 0.140 | 0.860 | |
## -------------------|-------------------|-------------------|-------------------|
##
##
Customer Retention Program
Has Annual Fee of $100
419 x $100 = $41,900
Customer Retention Program has a 30% Success Rate
392 x 30% = 118
117.6 x $2,300 = $270,480
Net Profit from the Program
$270,480 - $41,900 = $228,580
Net Profit from the Program per person
$228,580 / 2990 = $76.45