Predict Customer Attrition using the Credit Card data set , using the classification algorithm from the rpart package.
Split the data (10127 observations), into training and validation datasets (70%/30% , 7137/2990)
Interesting how months on the is perceived by many as a predictor for Attrition. However, the data shows that it is not a good predictor.
Using the validation data, the model accuracy can be observed
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 3016
##
##
## | validation_tree$Attrition_Flag
## validation_tree$Attrition_Flag_predicted | Attrited Customer | Existing Customer | Row Total |
## -----------------------------------------|-------------------|-------------------|-------------------|
## Attrited Customer | 380 | 103 | 483 |
## | 1229.819 | 227.601 | |
## | 0.787 | 0.213 | 0.160 |
## | 0.807 | 0.040 | |
## | 0.126 | 0.034 | |
## -----------------------------------------|-------------------|-------------------|-------------------|
## Existing Customer | 91 | 2442 | 2533 |
## | 234.506 | 43.400 | |
## | 0.036 | 0.964 | 0.840 |
## | 0.193 | 0.960 | |
## | 0.030 | 0.810 | |
## -----------------------------------------|-------------------|-------------------|-------------------|
## Column Total | 471 | 2545 | 3016 |
## | 0.156 | 0.844 | |
## -----------------------------------------|-------------------|-------------------|-------------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 1735.325 d.f. = 1 p = 0
##
## Pearson's Chi-squared test with Yates' continuity correction
## ------------------------------------------------------------
## Chi^2 = 1729.632 d.f. = 1 p = 0
##
##
the financial impact of the model, given the following assumptions: the customer retention program consists of forgiving the anual fee of $100 (on average) the value of a customer is $2,300 per year (on average) customer retention programs have a 30% success rate
The financial impact is $267,840 in savings from the retention program