Row

Chart A - Decision tree Model I

Chart B - Decision tree Model I - simple

Row

Chart C - Decision tree Model Model I - formula


Model formula:
default ~ checking_balance + months_loan_duration + credit_history + 
    purpose + amount + savings_balance + employment_duration + 
    percent_of_income + years_at_residence + age + other_credit + 
    housing + existing_loans_count + job + dependents + phone

Fitted party:
[1] root
|   [2] checking_balance < 0 DM, 1 - 200 DM
|   |   [3] months_loan_duration <= 30
|   |   |   [4] credit_history in critical, poor, good: no (n = 286, err = 36.0%)
|   |   |   [5] credit_history in very good, perfect: yes (n = 40, err = 30.0%)
|   |   [6] months_loan_duration > 30: yes (n = 76, err = 34.2%)
|   [7] checking_balance > 200 DM, unknown: no (n = 348, err = 12.4%)

Number of inner nodes:    3
Number of terminal nodes: 4

Row

Chart D - Confusion Matrix for Decision tree Model Model I

Confusion Matrix and Statistics

          Reference
Prediction  no yes
       no  158  50
       yes  16  26
                                          
               Accuracy : 0.736           
                 95% CI : (0.6768, 0.7895)
    No Information Rate : 0.696           
    P-Value [Acc > NIR] : 0.09455         
                                          
                  Kappa : 0.2862          
 Mcnemar's Test P-Value : 0.00004865      
                                          
            Sensitivity : 0.3421          
            Specificity : 0.9080          
         Pos Pred Value : 0.6190          
         Neg Pred Value : 0.7596          
             Prevalence : 0.3040          
         Detection Rate : 0.1040          
   Detection Prevalence : 0.1680          
      Balanced Accuracy : 0.6251          
                                          
       'Positive' Class : yes             
                                          

Row

Chart E - Decision tree Model II

Row

Chart F - Decision tree Model Model II - formula


Model formula:
default ~ checking_balance + months_loan_duration + credit_history + 
    purpose + amount + savings_balance + employment_duration + 
    percent_of_income + years_at_residence + age + other_credit + 
    housing + existing_loans_count + job + dependents + phone

Fitted party:
[1] root
|   [2] checking_balance < 0 DM, 1 - 200 DM
|   |   [3] months_loan_duration <= 30
|   |   |   [4] credit_history in critical, poor, good
|   |   |   |   [5] credit_history in critical, poor: no (n = 98, err = 23.5%)
|   |   |   |   [6] credit_history in good
|   |   |   |   |   [7] purpose in business, furniture/appliances, renovations: no (n = 119, err = 32.8%)
|   |   |   |   |   [8] purpose in car, car0, education: yes (n = 69, err = 40.6%)
|   |   |   [9] credit_history in very good, perfect
|   |   |   |   [10] housing in other, rent: yes (n = 17, err = 5.9%)
|   |   |   |   [11] housing in own: yes (n = 23, err = 47.8%)
|   |   [12] months_loan_duration > 30
|   |   |   [13] employment_duration < 1 year, > 7 years, 1 - 4 years
|   |   |   |   [14] years_at_residence <= 2: yes (n = 22, err = 45.5%)
|   |   |   |   [15] years_at_residence > 2: yes (n = 29, err = 6.9%)
|   |   |   [16] employment_duration in 4 - 7 years, unemployed
|   |   |   |   [17] age <= 29: yes (n = 10, err = 20.0%)
|   |   |   |   [18] age > 29: no (n = 15, err = 20.0%)
|   [19] checking_balance > 200 DM, unknown
|   |   [20] other_credit in none, store
|   |   |   [21] checking_balance > 200 DM: no (n = 42, err = 21.4%)
|   |   |   [22] checking_balance in unknown: no (n = 268, err = 9.0%)
|   |   [23] other_credit in bank: no (n = 38, err = 26.3%)

Number of inner nodes:    11
Number of terminal nodes: 12

Row

Chart G - Confusion Matrix for Decision tree Model Model II

Confusion Matrix and Statistics

          Reference
Prediction  no yes
       no  148  47
       yes  26  29
                                          
               Accuracy : 0.708           
                 95% CI : (0.6474, 0.7636)
    No Information Rate : 0.696           
    P-Value [Acc > NIR] : 0.36856         
                                          
                  Kappa : 0.2517          
 Mcnemar's Test P-Value : 0.01924         
                                          
            Sensitivity : 0.3816          
            Specificity : 0.8506          
         Pos Pred Value : 0.5273          
         Neg Pred Value : 0.7590          
             Prevalence : 0.3040          
         Detection Rate : 0.1160          
   Detection Prevalence : 0.2200          
      Balanced Accuracy : 0.6161          
                                          
       'Positive' Class : yes             
                                          

Row

Chart H - Random Forest Model


Call:
 randomForest(x = x, y = y, mtry = param$mtry) 
               Type of random forest: classification
                     Number of trees: 500
No. of variables tried at each split: 18

        OOB estimate of  error rate: 24.4%
Confusion matrix:
     no yes class.error
no  624  76   0.1085714
yes 168 132   0.5600000

Row

Chart I - Random Forest Model - variable importance

rf variable importance

  only 20 most important variables shown (out of 35)

                               Overall
amount                         100.000
age                             65.522
months_loan_duration            59.378
checking_balanceunknown         51.363
years_at_residence              23.263
percent_of_income               22.803
savings_balanceunknown          11.486
other_creditbank                11.091
existing_loans_count            10.095
phoneyes                         9.966
credit_historyvery good          8.896
purposefurniture/appliances      8.566
purposecar                       8.532
housingown                       8.316
employment_duration1 - 4 years   8.166
checking_balance1 - 200 DM       8.023
credit_historyperfect            7.942
jobskilled                       7.664
credit_historygood               7.082
employment_duration> 7 years     6.828

Row

Chart J - Random Forest Model - Final model plot I

Chart K - Random Forest Model - Final model plot II