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.7776698  0.05668749
##   0.002081756  0.7777964  0.05365759
##   0.003406510  0.7765299  0.01096180
## 
## 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  4533 1234
##       Yes   66   87
##                                           
##                Accuracy : 0.7804          
##                  95% CI : (0.7696, 0.7909)
##     No Information Rate : 0.7769          
##     P-Value [Acc > NIR] : 0.2617          
##                                           
##                   Kappa : 0.0752          
##                                           
##  Mcnemar's Test P-Value : <2e-16          
##                                           
##             Sensitivity : 0.98565         
##             Specificity : 0.06586         
##          Pos Pred Value : 0.78602         
##          Neg Pred Value : 0.56863         
##              Prevalence : 0.77686         
##          Detection Rate : 0.76571         
##    Detection Prevalence : 0.97416         
##       Balanced Accuracy : 0.52575         
##                                           
##        'Positive' Class : No              
##