LOADING DATA INTO R ENVIRONMENT

TRAINING THE RANDOM FOREST MODEL

Running the Training Model

## Random Forest 
## 
## 8001 samples
##    3 predictor
##    2 classes: 'No', 'Yes' 
## 
## No pre-processing
## Resampling: None

Variable Importance in Random Forest Model

TESTING THE RANDOM FOREST MODEL

Confusion Matrix at 50% Cut-Off Probability

## Confusion Matrix and Statistics
## 
##           Reference
## Prediction  Yes   No
##        Yes   19    5
##        No    47 1928
##                                          
##                Accuracy : 0.974          
##                  95% CI : (0.966, 0.9805)
##     No Information Rate : 0.967          
##     P-Value [Acc > NIR] : 0.04176        
##                                          
##                   Kappa : 0.4119         
##                                          
##  Mcnemar's Test P-Value : 1.303e-08      
##                                          
##             Sensitivity : 0.287879       
##             Specificity : 0.997413       
##          Pos Pred Value : 0.791667       
##          Neg Pred Value : 0.976203       
##              Prevalence : 0.033017       
##          Detection Rate : 0.009505       
##    Detection Prevalence : 0.012006       
##       Balanced Accuracy : 0.642646       
##                                          
##        'Positive' Class : Yes            
## 

Performance Metrics at different Cut-Off Probabilities

##    cutoff  Accuracy Senstivity Specificity      kappa
## 1    0.00 0.8229115 0.86363636   0.8215210 0.19810577
## 2    0.05 0.9684842 0.59090909   0.9813761 0.53692652
## 3    0.10 0.9739870 0.53030303   0.9891361 0.56044755
## 4    0.15 0.9759880 0.53030303   0.9912054 0.58102857
## 5    0.20 0.9754877 0.50000000   0.9917227 0.56157768
## 6    0.25 0.9754877 0.50000000   0.9917227 0.56157768
## 7    0.30 0.9764882 0.46969697   0.9937920 0.55727446
## 8    0.35 0.9769885 0.43939394   0.9953440 0.54675670
## 9    0.40 0.9774887 0.42424242   0.9963787 0.54402141
## 10   0.45 0.9759880 0.36363636   0.9968960 0.48946495
## 11   0.50 0.9739870 0.28787879   0.9974133 0.41186588
## 12   0.55 0.9729865 0.22727273   0.9984480 0.34791591
## 13   0.60 0.9719860 0.16666667   0.9994827 0.27468284
## 14   0.65 0.9679840 0.04545455   0.9994827 0.08225133
## 15   0.70 0.9669835 0.00000000   1.0000000 0.00000000
## 16   0.75 0.9669835 0.00000000   1.0000000 0.00000000
## 17   0.80 0.9669835 0.00000000   1.0000000 0.00000000
## 18   0.85 0.9669835 0.00000000   1.0000000 0.00000000
## 19   0.90 0.9669835 0.00000000   1.0000000 0.00000000
## 20   0.95 0.9669835 0.00000000   1.0000000 0.00000000
## 21   1.00 0.9669835 0.00000000   1.0000000 0.00000000