LOADING DATA INTO R ENVIRONMENT

TRAINING THE DECISION TREE MODEL

Running the Training Model

## CART 
## 
## 23681 samples
##     7 predictor
##     2 classes: 'No', 'Yes' 
## 
## No pre-processing
## Resampling: Cross-Validated (10 fold) 
## Summary of sample sizes: 21313, 21314, 21313, 21313, 21312, 21314, ... 
## Resampling results across tuning parameters:
## 
##   cp           Accuracy   Kappa     
##   0.001703255  0.7791055  0.07998385
##   0.002081756  0.7791899  0.08118771
##   0.003406510  0.7765722  0.02036714
## 
## Accuracy was used to select the optimal model using the largest value.
## The final value used for the model was cp = 0.002081756.

Variable Importance in Decision Tree Model

TESTING THE DECISION TREE MODEL

Confusion Matrix at 50% Cut-Off Probability

## Confusion Matrix and Statistics
## 
##          Actual
## Predicted   No  Yes
##       No  4530 1230
##       Yes   69   91
##                                           
##                Accuracy : 0.7806          
##                  95% CI : (0.7698, 0.7911)
##     No Information Rate : 0.7769          
##     P-Value [Acc > NIR] : 0.2516          
##                                           
##                   Kappa : 0.0785          
##                                           
##  Mcnemar's Test P-Value : <2e-16          
##                                           
##             Sensitivity : 0.98500         
##             Specificity : 0.06889         
##          Pos Pred Value : 0.78646         
##          Neg Pred Value : 0.56875         
##              Prevalence : 0.77686         
##          Detection Rate : 0.76520         
##    Detection Prevalence : 0.97297         
##       Balanced Accuracy : 0.52694         
##                                           
##        'Positive' Class : No              
##