Objective

Data Prep

-Created a new binary variable CreditCardData2 by classifying observations with 0 Customer Attrition as 0 and with one or more Customer Attrition as 1. -Split the data (10127 observations), into training and valdiation datasets (70%/30% , 425/176)

The Tree

Two Interpretations From The Tree

Most Likely Attrited Customer

  • Total Transaction Count <55
  • Total Revolving Balance Less than 614
  • Total Amount Changed for Q1-Q4 Less than 0.65

Unlikely Attrited Customer

  • Total Transaction Count <55
  • Total Transaction Amount >=5423

Variable Importance

Interesting how 12 months of inactivity would be perceived by many as a predictor for customer attrition. However, the data shows that is is not a good predictor.

Model Accuracy

Using the validation data, it is observed that the model is able to: - Predict correctly 83.9% of Existing Customers and mistake attrited customers as existing customers 15.2% of the time

## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  2990 
## 
##  
##                                | validation_tree$Attrition_Flag 
## validation_tree$Attrition_Flag | Attrited Customer | Existing Customer |         Row Total | 
## -------------------------------|-------------------|-------------------|-------------------|
##              Attrited Customer |               454 |                 0 |               454 | 
##                                |          2150.935 |           385.065 |                   | 
##                                |             1.000 |             0.000 |             0.152 | 
##                                |             1.000 |             0.000 |                   | 
##                                |             0.152 |             0.000 |                   | 
## -------------------------------|-------------------|-------------------|-------------------|
##              Existing Customer |                 0 |              2536 |              2536 | 
##                                |           385.065 |            68.935 |                   | 
##                                |             0.000 |             1.000 |             0.848 | 
##                                |             0.000 |             1.000 |                   | 
##                                |             0.000 |             0.848 |                   | 
## -------------------------------|-------------------|-------------------|-------------------|
##                   Column Total |               454 |              2536 |              2990 | 
##                                |             0.152 |             0.848 |                   | 
## -------------------------------|-------------------|-------------------|-------------------|
## 
##  
## Statistics for All Table Factors
## 
## 
## Pearson's Chi-squared test 
## ------------------------------------------------------------
## Chi^2 =  2990     d.f. =  1     p =  0 
## 
## Pearson's Chi-squared test with Yates' continuity correction 
## ------------------------------------------------------------
## Chi^2 =  2982.24     d.f. =  1     p =  0 
## 
##