credit <- read.csv("credit.csv")
summary("credit.csv")
##    Length     Class      Mode 
##         1 character character
str(data)
## function (..., list = character(), package = NULL, lib.loc = NULL, verbose = getOption("verbose"), 
##     envir = .GlobalEnv, overwrite = TRUE)
credit$default = factor(credit$default, levels=c(1,2),labels = c("no","yes"))

table(credit$default)
## 
##  no yes 
## 700 300
credit_rand <- credit[order(runif(1000)),]

credit_train <- credit_rand[1:900, 1:17]
credit_test <- credit_rand[901:100, 1:17]

prop.table(table(credit_train$default))
## 
##        no       yes 
## 0.7066667 0.2933333
library(C50)

credit_model <- C5.0(credit_train[,-17],credit_train$default)

credit_pred <- predict(credit_model, credit_test)

accuracy <- sum(credit_pred == credit_test$default)/nrow(credit_test)
errors=1-signif(accuracy,2)
errors
## [1] 0.11
credit_boost10 <- C5.0(credit_train[-17],credit_train$default,trials = 10)
summary(credit_boost10)
## 
## Call:
## C5.0.default(x = credit_train[-17], y = credit_train$default, trials = 10)
## 
## 
## C5.0 [Release 2.07 GPL Edition]      Tue Nov  7 09:29:38 2023
## -------------------------------
## 
## Class specified by attribute `outcome'
## 
## Read 900 cases (17 attributes) from undefined.data
## 
## -----  Trial 0:  -----
## 
## Decision tree:
## 
## checking_balance in {unknown,> 200 DM}:
## :...installment_plan = none: no (353/36)
## :   installment_plan in {bank,stores}:
## :   :...residence_history <= 1: no (9)
## :       residence_history > 1:
## :       :...age > 44: no (11)
## :           age <= 44:
## :           :...installment_rate <= 1: no (5)
## :               installment_rate > 1:
## :               :...purpose in {furniture,radio/tv,repairs,car (used),
## :                   :           retraining,others,
## :                   :           domestic appliances}: no (24/5)
## :                   purpose in {car (new),business,education}:
## :                   :...personal_status in {single male,married male,
## :                       :                   divorced male}: yes (12)
## :                       personal_status = female: no (4/1)
## checking_balance in {< 0 DM,1 - 200 DM}:
## :...months_loan_duration <= 22:
##     :...other_debtors = guarantor:
##     :   :...purpose = car (new): yes (3/1)
##     :   :   purpose in {business,education,furniture,radio/tv,repairs,
##     :   :               car (used),retraining,others,
##     :   :               domestic appliances}: no (22)
##     :   other_debtors = co-applicant:
##     :   :...amount <= 3949: no (6)
##     :   :   amount > 3949: yes (2)
##     :   other_debtors = none:
##     :   :...credit_history in {critical,delayed}: no (78/11)
##     :       credit_history in {fully repaid this bank,
##     :       :                  fully repaid}: yes (23/5)
##     :       credit_history = repaid:
##     :       :...savings_balance in {> 1000 DM,501 - 1000 DM}: no (14/1)
##     :           savings_balance in {101 - 500 DM,< 100 DM,unknown}:
##     :           :...purpose in {repairs,retraining,others}: no (7/2)
##     :               purpose = domestic appliances: yes (3)
##     :               purpose = business:
##     :               :...months_loan_duration <= 18: no (6)
##     :               :   months_loan_duration > 18: yes (2)
##     :               purpose = education:
##     :               :...amount <= 996: yes (4)
##     :               :   amount > 996: no (3)
##     :               purpose = car (used):
##     :               :...housing in {rent,own}: no (3)
##     :               :   housing = for free: yes (3)
##     :               purpose = furniture:
##     :               :...personal_status in {married male,
##     :               :   :                   divorced male}: no (3)
##     :               :   personal_status = single male:
##     :               :   :...months_loan_duration <= 10: no (3)
##     :               :   :   months_loan_duration > 10: yes (4/1)
##     :               :   personal_status = female:
##     :               :   :...employment_length = 1 - 4 yrs: yes (5)
##     :               :       employment_length in {> 7 yrs,4 - 7 yrs,0 - 1 yrs,
##     :               :                             unemployed}: no (10/3)
##     :               purpose = car (new):
##     :               :...amount > 10875: yes (2)
##     :               :   amount <= 10875:
##     :               :   :...amount > 1484: no (16/3)
##     :               :       amount <= 1484:
##     :               :       :...months_loan_duration <= 7: no (3)
##     :               :           months_loan_duration > 7: yes (16/2)
##     :               purpose = radio/tv:
##     :               :...installment_plan in {bank,stores}: yes (5/1)
##     :                   installment_plan = none:
##     :                   :...property = unknown/none: yes (2)
##     :                       property = real estate:
##     :                       :...savings_balance in {101 - 500 DM,
##     :                       :   :                   < 100 DM}: no (12/2)
##     :                       :   savings_balance = unknown: yes (1)
##     :                       property = building society savings:
##     :                       :...age <= 22: yes (2)
##     :                       :   age > 22: no (4)
##     :                       property = other:
##     :                       :...residence_history <= 3: yes (3/1)
##     :                           residence_history > 3: no (3)
##     months_loan_duration > 22:
##     :...savings_balance = < 100 DM:
##         :...months_loan_duration > 47: yes (26/2)
##         :   months_loan_duration <= 47:
##         :   :...housing = rent:
##         :       :...age <= 46: yes (19/1)
##         :       :   age > 46: no (2)
##         :       housing in {own,for free}:
##         :       :...purpose in {business,retraining,
##         :           :           domestic appliances}: yes (12/4)
##         :           purpose = repairs: no (2/1)
##         :           purpose = car (new):
##         :           :...installment_rate <= 2: no (3/1)
##         :           :   installment_rate > 2: yes (14)
##         :           purpose = education:
##         :           :...checking_balance = < 0 DM: yes (3)
##         :           :   checking_balance = 1 - 200 DM: no (3/1)
##         :           purpose = furniture:
##         :           :...checking_balance = < 0 DM: no (13/4)
##         :           :   checking_balance = 1 - 200 DM: yes (4)
##         :           purpose = others:
##         :           :...checking_balance = < 0 DM: no (2)
##         :           :   checking_balance = 1 - 200 DM: yes (2)
##         :           purpose = radio/tv:
##         :           :...existing_credits > 1: yes (3)
##         :           :   existing_credits <= 1:
##         :           :   :...installment_plan in {none,bank}: no (12/4)
##         :           :       installment_plan = stores: yes (2)
##         :           purpose = car (used):
##         :           :...personal_status in {married male,
##         :               :                   divorced male}: no (0)
##         :               personal_status = female: yes (1)
##         :               personal_status = single male:
##         :               :...age <= 27: yes (2)
##         :                   age > 27: no (11)
##         savings_balance in {101 - 500 DM,unknown,> 1000 DM,501 - 1000 DM}:
##         :...credit_history in {delayed,fully repaid this bank}: no (22/4)
##             credit_history = critical:
##             :...savings_balance in {101 - 500 DM,unknown,> 1000 DM}: no (8)
##             :   savings_balance = 501 - 1000 DM: yes (2)
##             credit_history = fully repaid:
##             :...housing = rent: yes (1)
##             :   housing in {own,for free}: no (3)
##             credit_history = repaid:
##             :...other_debtors in {guarantor,co-applicant}: yes (3)
##                 other_debtors = none:
##                 :...existing_credits > 1: no (3)
##                     existing_credits <= 1:
##                     :...checking_balance = < 0 DM: yes (14/3)
##                         checking_balance = 1 - 200 DM:
##                         :...savings_balance in {unknown,> 1000 DM,
##                             :                   501 - 1000 DM}: no (10/1)
##                             savings_balance = 101 - 500 DM:
##                             :...amount <= 3079: no (2)
##                                 amount > 3079: yes (5)
## 
## -----  Trial 1:  -----
## 
## Decision tree:
## 
## amount > 10875:
## :...credit_history in {repaid,critical,fully repaid this bank,
## :   :                  fully repaid}: yes (32.8/3.9)
## :   credit_history = delayed: no (2.3)
## amount <= 10875:
## :...purpose = car (used): no (78.9/7.8)
##     purpose in {car (new),business,education,furniture,radio/tv,repairs,
##     :           retraining,others,domestic appliances}:
##     :...months_loan_duration <= 8: no (67.2/9.4)
##         months_loan_duration > 8:
##         :...checking_balance = unknown:
##             :...employment_length in {> 7 yrs,4 - 7 yrs}: no (113.3/18.7)
##             :   employment_length in {1 - 4 yrs,0 - 1 yrs,unemployed}:
##             :   :...other_debtors in {guarantor,co-applicant}: yes (14/3.1)
##             :       other_debtors = none:
##             :       :...amount > 4455:
##             :           :...housing in {rent,own}: yes (30.8/4.7)
##             :           :   housing = for free: no (3.9/0.8)
##             :           amount <= 4455:
##             :           :...installment_plan in {bank,stores}: yes (11.3/4.7)
##             :               installment_plan = none:
##             :               :...personal_status in {single male,married male,
##             :                   :                   divorced male}: no (43)
##             :                   personal_status = female:
##             :                   :...purpose in {business,radio/tv,retraining,
##             :                       :           others,
##             :                       :           domestic appliances}: no (14.9)
##             :                       purpose in {car (new),education,furniture,
##             :                       :           repairs}: [S1]
##             checking_balance in {< 0 DM,1 - 200 DM,> 200 DM}:
##             :...other_debtors = guarantor:
##                 :...property in {real estate,
##                 :   :            building society savings}: no (23/3.1)
##                 :   property in {unknown/none,other}: yes (2.3)
##                 other_debtors in {none,co-applicant}:
##                 :...savings_balance in {unknown,> 1000 DM}: no (68.7/25.4)
##                     savings_balance = 501 - 1000 DM:
##                     :...installment_rate <= 3: no (7.8/0.8)
##                     :   installment_rate > 3: yes (11.3/2.3)
##                     savings_balance = 101 - 500 DM:
##                     :...personal_status in {female,married male}: yes (18/3.9)
##                     :   personal_status = divorced male: no (3.1/1.6)
##                     :   personal_status = single male:
##                     :   :...property in {real estate,other}: no (8.6)
##                     :       property in {unknown/none,
##                     :                    building society savings}: yes (9.8/3.9)
##                     savings_balance = < 100 DM:
##                     :...months_loan_duration <= 16:
##                         :...employment_length in {> 7 yrs,0 - 1 yrs}:
##                         :   :...installment_plan = bank: no (6.6/1.6)
##                         :   :   installment_plan = stores: yes (1.6)
##                         :   :   installment_plan = none:
##                         :   :   :...residence_history <= 3: yes (30/4.7)
##                         :   :       residence_history > 3: no (15.2/5.9)
##                         :   employment_length in {1 - 4 yrs,4 - 7 yrs,
##                         :   :                     unemployed}:
##                         :   :...amount > 1123: no (51.1/6.6)
##                         :       amount <= 1123:
##                         :       :...other_debtors = co-applicant: no (1.6)
##                         :           other_debtors = none:
##                         :           :...installment_rate <= 2: no (3.1/0.8)
##                         :               installment_rate > 2: yes (16.8/3.1)
##                         months_loan_duration > 16: [S2]
## 
## SubTree [S1]
## 
## credit_history in {repaid,delayed,fully repaid this bank,
## :                  fully repaid}: yes (17.5/3.9)
## credit_history = critical: no (10.5/2.7)
## 
## SubTree [S2]
## 
## credit_history in {delayed,fully repaid this bank}: yes (32.8/3.9)
## credit_history in {repaid,critical,fully repaid}:
## :...purpose in {car (new),education,repairs,retraining,others,
##     :           domestic appliances}: yes (40.2/11.3)
##     purpose = business:
##     :...housing in {rent,for free}: yes (3.1)
##     :   housing = own: no (19.9/3.9)
##     purpose = radio/tv:
##     :...employment_length in {1 - 4 yrs,0 - 1 yrs,unemployed}: yes (33.5/4.7)
##     :   employment_length in {> 7 yrs,4 - 7 yrs}: no (7/0.8)
##     purpose = furniture:
##     :...installment_plan = stores: no (2.3)
##         installment_plan in {none,bank}:
##         :...personal_status = single male: yes (16.8/4.7)
##             personal_status in {married male,divorced male}: no (5.1/0.8)
##             personal_status = female:
##             :...checking_balance in {< 0 DM,> 200 DM}: yes (12.5/3.1)
##                 checking_balance = 1 - 200 DM: no (7.4/2.3)
## 
## -----  Trial 2:  -----
## 
## Decision tree:
## 
## checking_balance = unknown:
## :...purpose in {education,retraining,others,
## :   :           domestic appliances}: no (23.6/8.1)
## :   purpose = repairs: yes (9.6/3.8)
## :   purpose = radio/tv:
## :   :...age <= 23: yes (8.3/2.5)
## :   :   age > 23: no (86.3/15.3)
## :   purpose = car (used):
## :   :...amount <= 10974: no (32)
## :   :   amount > 10974: yes (2.2)
## :   purpose = business:
## :   :...employment_length in {0 - 1 yrs,unemployed}: yes (6.9)
## :   :   employment_length in {1 - 4 yrs,> 7 yrs,4 - 7 yrs}:
## :   :   :...existing_credits <= 2: no (20.8/0.6)
## :   :       existing_credits > 2: yes (2.2)
## :   purpose = furniture:
## :   :...other_debtors = guarantor: no (0)
## :   :   other_debtors = co-applicant: yes (5/0.6)
## :   :   other_debtors = none:
## :   :   :...months_loan_duration <= 30: no (42.9/8)
## :   :       months_loan_duration > 30: yes (7.8/1.3)
## :   purpose = car (new):
## :   :...installment_rate <= 1: no (9)
## :       installment_rate > 1:
## :       :...other_debtors = guarantor: yes (2.8/0.6)
## :           other_debtors = co-applicant: no (1.3)
## :           other_debtors = none:
## :           :...amount > 2522: yes (25.4/8)
## :               amount <= 2522:
## :               :...age <= 26: yes (2.8/0.6)
## :                   age > 26: no (23/0.6)
## checking_balance in {< 0 DM,1 - 200 DM,> 200 DM}:
## :...credit_history = fully repaid this bank:
##     :...other_debtors = guarantor: yes (1.3)
##     :   other_debtors = co-applicant: no (4/0.6)
##     :   other_debtors = none:
##     :   :...age <= 23: no (3.4)
##     :       age > 23:
##     :       :...amount <= 409: no (2.8)
##     :           amount > 409: yes (35.5/2.5)
##     credit_history in {repaid,critical,delayed,fully repaid}:
##     :...other_debtors = guarantor: no (27.8/7.4)
##         other_debtors = co-applicant: yes (20.5/8.8)
##         other_debtors = none:
##         :...personal_status = married male:
##             :...credit_history = delayed: yes (4.3)
##             :   credit_history = fully repaid: no (2.2)
##             :   credit_history in {repaid,critical}:
##             :   :...checking_balance = < 0 DM: no (20/7.4)
##             :       checking_balance in {1 - 200 DM,> 200 DM}: yes (23.4/8.8)
##             personal_status = divorced male:
##             :...age <= 29: no (4.1)
##             :   age > 29:
##             :   :...housing = rent: yes (8.8)
##             :       housing = for free: no (0.6)
##             :       housing = own:
##             :       :...age <= 46: yes (21.3/3.8)
##             :           age > 46: no (3.6)
##             personal_status = single male:
##             :...savings_balance in {101 - 500 DM,> 1000 DM}: no (23.2/3.4)
##             :   savings_balance = 501 - 1000 DM: yes (5.3/2.5)
##             :   savings_balance = unknown:
##             :   :...credit_history in {repaid,critical}: yes (31.1/14.6)
##             :   :   credit_history in {delayed,fully repaid}: no (7.3)
##             :   savings_balance = < 100 DM:
##             :   :...amount > 7596: yes (13.7/1.3)
##             :       amount <= 7596:
##             :       :...credit_history = critical: no (37.2/6.3)
##             :           credit_history in {delayed,
##             :           :                  fully repaid}: yes (30.1/10.3)
##             :           credit_history = repaid:
##             :           :...property in {real estate,unknown/none,
##             :               :            building society savings}: no (53.5/17.9)
##             :               property = other:
##             :               :...existing_credits > 1: no (2.9)
##             :                   existing_credits <= 1:
##             :                   :...amount <= 4308: yes (18.5/3.6)
##             :                       amount > 4308: no (3.6)
##             personal_status = female:
##             :...residence_history <= 1:
##                 :...age <= 36: no (23.7/3.1)
##                 :   age > 36: yes (4.1/1.3)
##                 residence_history > 1:
##                 :...months_loan_duration > 39: yes (10.5/0.6)
##                     months_loan_duration <= 39:
##                     :...age > 56: no (8.2)
##                         age <= 56:
##                         :...credit_history = delayed: no (7.1/1.3)
##                             credit_history = fully repaid: yes (4.7/2.2)
##                             credit_history = critical: [S1]
##                             credit_history = repaid:
##                             :...purpose in {car (new),education,retraining,
##                                 :           others,
##                                 :           domestic appliances}: yes (35.9/7)
##                                 purpose in {business,repairs,
##                                 :           car (used)}: no (11.4/3.6)
##                                 purpose = radio/tv:
##                                 :...months_loan_duration <= 18: yes (10.8/1.3)
##                                 :   months_loan_duration > 18: no (9.5/0.6)
##                                 purpose = furniture:
##                                 :...amount > 3416: no (6.2)
##                                     amount <= 3416: [S2]
## 
## SubTree [S1]
## 
## property in {real estate,unknown/none,other}: yes (17.6/4.8)
## property = building society savings: no (6.5)
## 
## SubTree [S2]
## 
## checking_balance in {< 0 DM,1 - 200 DM}: yes (18.9/2.5)
## checking_balance = > 200 DM: no (2.9)
## 
## -----  Trial 3:  -----
## 
## Decision tree:
## 
## checking_balance in {unknown,> 200 DM}:
## :...purpose in {repairs,car (used),retraining,others,
## :   :           domestic appliances}: no (47.6/6.5)
## :   purpose = business:
## :   :...amount > 7763: yes (4.1)
## :   :   amount <= 7763:
## :   :   :...checking_balance = unknown: no (21/4.7)
## :   :       checking_balance = > 200 DM: yes (5.4/1.9)
## :   purpose = education:
## :   :...age > 43: no (4.6)
## :   :   age <= 43:
## :   :   :...savings_balance in {101 - 500 DM,< 100 DM,> 1000 DM,
## :   :       :                   501 - 1000 DM}: yes (17.2/4.3)
## :   :       savings_balance = unknown: no (2)
## :   purpose = car (new):
## :   :...employment_length in {0 - 1 yrs,unemployed}: no (13.2)
## :   :   employment_length in {1 - 4 yrs,> 7 yrs,4 - 7 yrs}:
## :   :   :...existing_credits <= 1: no (41.1/10.3)
## :   :       existing_credits > 1:
## :   :       :...installment_plan = none: no (19.3/6.5)
## :   :           installment_plan in {bank,stores}: yes (8.3/1)
## :   purpose = furniture:
## :   :...employment_length in {> 7 yrs,4 - 7 yrs}: no (14.8)
## :   :   employment_length in {1 - 4 yrs,0 - 1 yrs,unemployed}:
## :   :   :...other_debtors = guarantor: no (0)
## :   :       other_debtors = co-applicant: yes (3.6)
## :   :       other_debtors = none:
## :   :       :...savings_balance in {101 - 500 DM,unknown,> 1000 DM,
## :   :           :                   501 - 1000 DM}: no (12.3/2.9)
## :   :           savings_balance = < 100 DM:
## :   :           :...amount <= 2171: no (10.9)
## :   :               amount > 2171:
## :   :               :...age <= 34: yes (18.5/2.9)
## :   :                   age > 34: no (2.4)
## :   purpose = radio/tv:
## :   :...age > 44: no (16.9)
## :       age <= 44:
## :       :...credit_history in {delayed,fully repaid this bank}: no (10.3/2.9)
## :           credit_history = fully repaid: yes (2.3/0.5)
## :           credit_history = critical:
## :           :...installment_plan in {none,stores}: no (22/2.9)
## :           :   installment_plan = bank: yes (4.9/0.5)
## :           credit_history = repaid:
## :           :...existing_credits > 1: yes (14.1/2.4)
## :               existing_credits <= 1:
## :               :...installment_plan = bank: no (3.4)
## :                   installment_plan = stores: yes (1.8)
## :                   installment_plan = none:
## :                   :...months_loan_duration <= 9: yes (6.3/1.5)
## :                       months_loan_duration > 9: no (34.2/5.3)
## checking_balance in {< 0 DM,1 - 200 DM}:
## :...months_loan_duration <= 11:
##     :...credit_history in {repaid,critical,delayed,fully repaid}: no (69.1/15)
##     :   credit_history = fully repaid this bank: yes (6)
##     months_loan_duration > 11:
##     :...savings_balance in {> 1000 DM,501 - 1000 DM}: no (26.9/8.9)
##         savings_balance = 101 - 500 DM:
##         :...age <= 45: no (38.5/15.3)
##         :   age > 45: yes (5)
##         savings_balance = unknown:
##         :...credit_history in {critical,delayed,fully repaid}: no (12.7)
##         :   credit_history in {repaid,fully repaid this bank}:
##         :   :...other_debtors = guarantor: yes (0)
##         :       other_debtors = co-applicant: no (2.7)
##         :       other_debtors = none:
##         :       :...installment_plan = bank: no (12.8/4.3)
##         :           installment_plan = stores: yes (2.9)
##         :           installment_plan = none:
##         :           :...checking_balance = < 0 DM: yes (23.1/4.6)
##         :               checking_balance = 1 - 200 DM: no (22.4/8.8)
##         savings_balance = < 100 DM:
##         :...months_loan_duration > 47: yes (26.8/4.7)
##             months_loan_duration <= 47:
##             :...purpose in {education,repairs,
##                 :           domestic appliances}: yes (26.5/8.6)
##                 purpose in {retraining,others}: no (14.1/4)
##                 purpose = business:
##                 :...months_loan_duration <= 18: no (6.2)
##                 :   months_loan_duration > 18: yes (18.6/7.6)
##                 purpose = car (used):
##                 :...personal_status in {single male,married male,
##                 :   :                   divorced male}: no (18.5/6.5)
##                 :   personal_status = female: yes (4.1)
##                 purpose = radio/tv:
##                 :...months_loan_duration > 36: yes (6.1)
##                 :   months_loan_duration <= 36:
##                 :   :...other_debtors in {guarantor,
##                 :       :                 co-applicant}: no (8.9/0.5)
##                 :       other_debtors = none:
##                 :       :...housing in {rent,for free}: yes (10.7/2.4)
##                 :           housing = own:
##                 :           :...installment_plan in {none,bank}: no (30.1/11.3)
##                 :               installment_plan = stores: yes (2.9)
##                 purpose = car (new):
##                 :...installment_plan in {bank,stores}: yes (15.6/2.4)
##                 :   installment_plan = none:
##                 :   :...other_debtors = guarantor: no (1.8)
##                 :       other_debtors = co-applicant: yes (5)
##                 :       other_debtors = none:
##                 :       :...installment_rate <= 2:
##                 :           :...personal_status in {single male,female,
##                 :           :   :                   married male}: no (13.7/1.9)
##                 :           :   personal_status = divorced male: yes (6.2/1.4)
##                 :           installment_rate > 2:
##                 :           :...personal_status in {female,
##                 :               :                   divorced male}: yes (10.6)
##                 :               personal_status in {single male,married male}:
##                 :               :...months_loan_duration <= 22: no (13.6/4.8)
##                 :                   months_loan_duration > 22: yes (4.4)
##                 purpose = furniture:
##                 :...installment_rate <= 1: no (9.6/1)
##                     installment_rate > 1:
##                     :...installment_plan = bank: yes (10.3/1.4)
##                         installment_plan = stores: no (1.9)
##                         installment_plan = none:
##                         :...residence_history <= 1: no (8.1)
##                             residence_history > 1:
##                             :...installment_rate <= 2: no (10.7/2.9)
##                                 installment_rate > 2:
##                                 :...residence_history <= 3: yes (18.9/2.9)
##                                     residence_history > 3: no (11.2/4.7)
## 
## -----  Trial 4:  -----
## 
## Decision tree:
## 
## checking_balance in {unknown,> 200 DM}:
## :...employment_length = 4 - 7 yrs: no (47.6/7.3)
## :   employment_length in {1 - 4 yrs,> 7 yrs,0 - 1 yrs,unemployed}:
## :   :...credit_history in {fully repaid this bank,fully repaid}: no (15.6/6.3)
## :       credit_history = critical:
## :       :...amount <= 6967: no (79/15)
## :       :   amount > 6967: yes (14.9/4.3)
## :       credit_history = delayed:
## :       :...personal_status in {female,married male}: no (5.9)
## :       :   personal_status in {single male,divorced male}:
## :       :   :...installment_rate <= 3: no (6.3/1.9)
## :       :       installment_rate > 3: yes (17.1/1.2)
## :       credit_history = repaid:
## :       :...existing_credits > 1:
## :           :...installment_rate <= 3: yes (19.5/3.1)
## :           :   installment_rate > 3: no (9/1.4)
## :           existing_credits <= 1:
## :           :...purpose in {car (new),business,education,car (used),retraining,
## :               :           others,domestic appliances}: no (58.9/17.7)
## :               purpose = repairs: yes (2.7)
## :               purpose = radio/tv:
## :               :...other_debtors in {guarantor,none}: no (35.3/6.8)
## :               :   other_debtors = co-applicant: yes (5.3/1.1)
## :               purpose = furniture:
## :               :...installment_plan = bank: yes (2.8/0.4)
## :                   installment_plan = stores: no (2.2)
## :                   installment_plan = none:
## :                   :...age <= 27: no (7.9)
## :                       age > 27: yes (16/3.3)
## checking_balance in {< 0 DM,1 - 200 DM}:
## :...credit_history = fully repaid this bank: yes (36.8/9.3)
##     credit_history = fully repaid:
##     :...housing in {rent,for free}: yes (9.8)
##     :   housing = own:
##     :   :...installment_rate <= 3: no (18.2/4.5)
##     :       installment_rate > 3: yes (3.5)
##     credit_history = delayed:
##     :...installment_rate <= 1: no (8.9)
##     :   installment_rate > 1:
##     :   :...savings_balance = unknown: no (3.3)
##     :       savings_balance in {> 1000 DM,501 - 1000 DM}: yes (3.9)
##     :       savings_balance in {101 - 500 DM,< 100 DM}:
##     :       :...employment_length in {1 - 4 yrs,> 7 yrs,4 - 7 yrs,
##     :           :                     unemployed}: no (19.2/6.3)
##     :           employment_length = 0 - 1 yrs: yes (6.8)
##     credit_history = critical:
##     :...savings_balance in {101 - 500 DM,unknown,> 1000 DM}: no (16.2)
##     :   savings_balance in {< 100 DM,501 - 1000 DM}:
##     :   :...age > 61: no (6.1)
##     :       age <= 61:
##     :       :...months_loan_duration > 36: yes (6.5)
##     :           months_loan_duration <= 36:
##     :           :...housing = for free: no (7.9/1.4)
##     :               housing = rent:
##     :               :...residence_history <= 3: no (4.2)
##     :               :   residence_history > 3: yes (14.5/1.9)
##     :               housing = own:
##     :               :...existing_credits > 2: no (5.3)
##     :                   existing_credits <= 2:
##     :                   :...amount > 7685: yes (5.5)
##     :                       amount <= 7685:
##     :                       :...employment_length in {1 - 4 yrs,> 7 yrs,
##     :                           :                     0 - 1 yrs,
##     :                           :                     unemployed}: yes (41/19.5)
##     :                           employment_length = 4 - 7 yrs: no (7.9)
##     credit_history = repaid:
##     :...amount > 8072: yes (31.5/4.2)
##         amount <= 8072:
##         :...other_debtors in {guarantor,co-applicant}: no (22/7.2)
##             other_debtors = none:
##             :...purpose in {business,education,repairs,car (used),
##                 :           others}: no (62.4/18.8)
##                 purpose in {radio/tv,retraining,
##                 :           domestic appliances}: yes (83.7/33.7)
##                 purpose = car (new):
##                 :...installment_rate <= 2: no (16.9/5.6)
##                 :   installment_rate > 2: yes (41.6/7.7)
##                 purpose = furniture:
##                 :...checking_balance = 1 - 200 DM: yes (25.2/7.6)
##                     checking_balance = < 0 DM:
##                     :...residence_history <= 1: no (6.8/2.3)
##                         residence_history > 1:
##                         :...installment_plan = bank: yes (4.2/0.4)
##                             installment_plan = stores: no (1.1)
##                             installment_plan = none:
##                             :...installment_rate <= 1: no (4.9)
##                                 installment_rate > 1:
##                                 :...age <= 23: yes (8.5)
##                                     age > 23: no (19.6/8.4)
## 
## -----  Trial 5:  -----
## 
## Decision tree:
## 
## credit_history = critical:
## :...age > 60: no (14.2)
## :   age <= 60:
## :   :...installment_plan = stores: no (11.3/4.2)
## :       installment_plan = bank:
## :       :...existing_credits <= 1: yes (12.5/2.9)
## :       :   existing_credits > 1:
## :       :   :...months_loan_duration <= 16: no (7.9)
## :       :       months_loan_duration > 16: yes (15.3/5.1)
## :       installment_plan = none:
## :       :...checking_balance in {< 0 DM,1 - 200 DM}: no (92.2/32.8)
## :           checking_balance = > 200 DM: yes (14.4/4.5)
## :           checking_balance = unknown:
## :           :...age > 30: no (35.1)
## :               age <= 30:
## :               :...age <= 29: no (13.3/1.2)
## :                   age > 29: yes (7.4/1)
## credit_history in {repaid,delayed,fully repaid this bank,fully repaid}:
## :...property = real estate:
##     :...savings_balance in {101 - 500 DM,> 1000 DM}: no (17.6)
##     :   savings_balance in {< 100 DM,unknown,501 - 1000 DM}:
##     :   :...months_loan_duration <= 9: no (31.7/3.9)
##     :       months_loan_duration > 9:
##     :       :...purpose in {business,education,repairs,
##     :           :           domestic appliances}: yes (15.1/2.6)
##     :           purpose in {car (used),retraining,others}: no (6.9)
##     :           purpose = car (new):
##     :           :...amount <= 2812: yes (20.2/6.9)
##     :           :   amount > 2812: no (6.2)
##     :           purpose = furniture:
##     :           :...installment_plan = bank: yes (3.5/0.3)
##     :           :   installment_plan = stores: no (3.5)
##     :           :   installment_plan = none:
##     :           :   :...months_loan_duration <= 15: no (6.6)
##     :           :       months_loan_duration > 15: yes (12.1/4.5)
##     :           purpose = radio/tv:
##     :           :...credit_history in {delayed,fully repaid}: no (3.2/0.3)
##     :               credit_history = fully repaid this bank: yes (1.2)
##     :               credit_history = repaid:
##     :               :...months_loan_duration > 42: yes (4.6)
##     :                   months_loan_duration <= 42:
##     :                   :...other_debtors in {guarantor,none}: no (36.4/14.6)
##     :                       other_debtors = co-applicant: yes (3.4)
##     property in {unknown/none,building society savings,other}:
##     :...checking_balance = > 200 DM:
##         :...months_loan_duration <= 11: yes (7/1.6)
##         :   months_loan_duration > 11: no (24.5/3.3)
##         checking_balance in {unknown,< 0 DM,1 - 200 DM}:
##         :...savings_balance in {unknown,501 - 1000 DM}:
##             :...other_debtors = guarantor: yes (3.3)
##             :   other_debtors = co-applicant: no (2.1)
##             :   other_debtors = none:
##             :   :...checking_balance in {unknown,1 - 200 DM}:
##             :       :...personal_status in {married male,
##             :       :   :                   divorced male}: no (3.7)
##             :       :   personal_status = female:
##             :       :   :...months_loan_duration <= 21: yes (15.1/3.6)
##             :       :   :   months_loan_duration > 21: no (14.5/2)
##             :       :   personal_status = single male:
##             :       :   :...installment_rate > 3: no (24.7/1.2)
##             :       :       installment_rate <= 3:
##             :       :       :...existing_credits <= 1: no (16.3/5.3)
##             :       :           existing_credits > 1: yes (6.9/1.7)
##             :       checking_balance = < 0 DM:
##             :       :...existing_credits > 1: no (3.6/0.9)
##             :           existing_credits <= 1: [S1]
##             savings_balance in {101 - 500 DM,< 100 DM,> 1000 DM}:
##             :...residence_history <= 1:
##                 :...installment_rate <= 1: yes (11.4/2.1)
##                 :   installment_rate > 1:
##                 :   :...housing = rent: yes (4.5/0.7)
##                 :       housing in {own,for free}: no (41.1/12.8)
##                 residence_history > 1:
##                 :...installment_rate > 2: yes (181.9/55)
##                     installment_rate <= 2:
##                     :...credit_history = delayed: no (16.3/1)
##                         credit_history in {repaid,fully repaid this bank,
##                         :                  fully repaid}:
##                         :...employment_length in {> 7 yrs,
##                             :                     0 - 1 yrs}: yes (33.5/9.3)
##                             employment_length in {4 - 7 yrs,
##                             :                     unemployed}: no (24.9/9.5)
##                             employment_length = 1 - 4 yrs:
##                             :...savings_balance in {101 - 500 DM,
##                                 :                   > 1000 DM}: yes (9.5/0.7)
##                                 savings_balance = < 100 DM: [S2]
## 
## SubTree [S1]
## 
## credit_history in {delayed,fully repaid this bank,fully repaid}: yes (4.2)
## credit_history = repaid:
## :...employment_length in {1 - 4 yrs,> 7 yrs,4 - 7 yrs}: yes (19/4.1)
##     employment_length in {0 - 1 yrs,unemployed}: no (3.6)
## 
## SubTree [S2]
## 
## purpose in {education,repairs,retraining,domestic appliances}: yes (0)
## purpose in {car (new),radio/tv}: no (7.5)
## purpose in {business,furniture,car (used),others}:
## :...personal_status in {single male,female,divorced male}: yes (21.5/5.2)
##     personal_status = married male: no (3.5)
## 
## -----  Trial 6:  -----
## 
## Decision tree:
## 
## checking_balance = unknown:
## :...employment_length = 4 - 7 yrs: no (41/3.9)
## :   employment_length in {1 - 4 yrs,> 7 yrs,0 - 1 yrs,unemployed}:
## :   :...purpose in {education,repairs}: yes (25.6/11.6)
## :       purpose in {car (used),retraining,others,
## :       :           domestic appliances}: no (22.4/1.8)
## :       purpose = business:
## :       :...employment_length in {1 - 4 yrs,> 7 yrs}: no (17.6/4.2)
## :       :   employment_length in {0 - 1 yrs,unemployed}: yes (10.4)
## :       purpose = furniture:
## :       :...other_debtors in {guarantor,none}: no (37.1/11.1)
## :       :   other_debtors = co-applicant: yes (2.8)
## :       purpose = car (new):
## :       :...employment_length in {> 7 yrs,0 - 1 yrs,unemployed}: no (23.2/5.9)
## :       :   employment_length = 1 - 4 yrs:
## :       :   :...months_loan_duration <= 9: no (4.5)
## :       :       months_loan_duration > 9: yes (23/8.2)
## :       purpose = radio/tv:
## :       :...existing_credits <= 1: no (32.5/5.3)
## :           existing_credits > 1:
## :           :...credit_history in {repaid,delayed}: yes (14.8/4.8)
## :               credit_history in {critical,fully repaid this bank,
## :                                  fully repaid}: no (13.4)
## checking_balance in {< 0 DM,1 - 200 DM,> 200 DM}:
## :...savings_balance = 501 - 1000 DM: no (27.5/11.6)
##     savings_balance = > 1000 DM:
##     :...installment_plan = none: no (11.2)
##     :   installment_plan in {bank,stores}: yes (7.5/2.4)
##     savings_balance = 101 - 500 DM:
##     :...personal_status = single male: no (27.9/8.6)
##     :   personal_status in {female,married male,divorced male}:
##     :   :...credit_history in {repaid,fully repaid this bank,
##     :       :                  fully repaid}: yes (29.4/5.1)
##     :       credit_history in {critical,delayed}: no (4.2)
##     savings_balance = unknown:
##     :...other_debtors in {guarantor,co-applicant}: no (4.7)
##     :   other_debtors = none:
##     :   :...existing_credits > 1: no (21.2/6.6)
##     :       existing_credits <= 1:
##     :       :...amount > 10297: yes (5.3/0.8)
##     :           amount <= 10297:
##     :           :...personal_status in {single male,
##     :               :                   divorced male}: no (26.2/9.1)
##     :               personal_status = married male: yes (5.9/0.8)
##     :               personal_status = female:
##     :               :...amount <= 2782: yes (15.4/4.1)
##     :                   amount > 2782: no (11.4/0.8)
##     savings_balance = < 100 DM:
##     :...credit_history = fully repaid this bank:
##         :...personal_status in {single male,married male}: no (8.7/3.3)
##         :   personal_status in {female,divorced male}: yes (11.2)
##         credit_history = fully repaid:
##         :...age <= 33: no (16.9/6.8)
##         :   age > 33: yes (9.4)
##         credit_history = delayed:
##         :...months_loan_duration <= 16: no (6)
##         :   months_loan_duration > 16:
##         :   :...installment_rate <= 1: no (3.7)
##         :       installment_rate > 1: yes (18.1/2.1)
##         credit_history = critical:
##         :...personal_status = divorced male: yes (7.8/0.9)
##         :   personal_status in {single male,female,married male}:
##         :   :...installment_rate <= 1: no (11.1/1)
##         :       installment_rate > 1:
##         :       :...months_loan_duration > 42: yes (4.5)
##         :           months_loan_duration <= 42:
##         :           :...residence_history <= 1: no (3.4)
##         :               residence_history > 1:
##         :               :...residence_history <= 3: yes (37.1/14.5)
##         :                   residence_history > 3: no (40.6/14.8)
##         credit_history = repaid:
##         :...other_debtors = guarantor: no (16/3.6)
##             other_debtors = co-applicant: yes (13/5)
##             other_debtors = none:
##             :...purpose in {business,education,others}: no (28.1/12.2)
##                 purpose in {repairs,car (used),retraining,
##                 :           domestic appliances}: yes (28.5/11.3)
##                 purpose = car (new):
##                 :...personal_status = married male: no (2.6)
##                 :   personal_status = divorced male: yes (4.8)
##                 :   personal_status in {single male,female}:
##                 :   :...checking_balance = > 200 DM: no (2.8)
##                 :       checking_balance in {< 0 DM,1 - 200 DM}:
##                 :       :...installment_rate > 3: yes (9.1)
##                 :           installment_rate <= 3:
##                 :           :...residence_history <= 2: yes (7.9/1.7)
##                 :               residence_history > 2: no (11.4/1.5)
##                 purpose = furniture:
##                 :...amount > 4657: yes (5.6)
##                 :   amount <= 4657:
##                 :   :...checking_balance = 1 - 200 DM: yes (14.7/6.1)
##                 :       checking_balance = > 200 DM: no (8.8/1.6)
##                 :       checking_balance = < 0 DM:
##                 :       :...amount > 3448: no (7.7)
##                 :           amount <= 3448:
##                 :           :...residence_history <= 1: no (3.1)
##                 :               residence_history > 1: yes (17.1/6.9)
##                 purpose = radio/tv:
##                 :...employment_length in {> 7 yrs,4 - 7 yrs}: no (17.2/3.8)
##                     employment_length = unemployed: yes (0.3)
##                     employment_length = 0 - 1 yrs:
##                     :...age <= 25: yes (10.9)
##                     :   age > 25: no (10.6/2.8)
##                     employment_length = 1 - 4 yrs:
##                     :...residence_history <= 1: no (5.9)
##                         residence_history > 1:
##                         :...installment_plan in {bank,stores}: yes (2.8)
##                             installment_plan = none:
##                             :...amount <= 4057: no (21.9/8)
##                                 amount > 4057: yes (4.5)
## 
## -----  Trial 7:  -----
## 
## Decision tree:
## 
## checking_balance = unknown:
## :...installment_plan = stores: yes (13.2/5.3)
## :   installment_plan = bank:
## :   :...installment_rate <= 1: no (4.7)
## :   :   installment_rate > 1:
## :   :   :...age > 44: no (7.7)
## :   :       age <= 44:
## :   :       :...other_debtors in {guarantor,co-applicant}: no (2.1)
## :   :           other_debtors = none:
## :   :           :...amount <= 709: no (4.5)
## :   :               amount > 709:
## :   :               :...personal_status in {female,
## :   :                   :                   divorced male}: yes (8.1/1.5)
## :   :                   personal_status = married male: no (1.4)
## :   :                   personal_status = single male:
## :   :                   :...savings_balance in {101 - 500 DM,
## :   :                       :                   unknown}: no (3.9)
## :   :                       savings_balance in {< 100 DM,> 1000 DM,
## :   :                                           501 - 1000 DM}: yes (19.6/3.3)
## :   installment_plan = none:
## :   :...credit_history in {fully repaid this bank,fully repaid}: no (4.8)
## :       credit_history = critical:
## :       :...amount <= 6967: no (47/2.9)
## :       :   amount > 6967: yes (6.8/1.9)
## :       credit_history = delayed:
## :       :...property in {real estate,building society savings}: no (5.6)
## :       :   property in {unknown/none,other}: yes (17.4/6.9)
## :       credit_history = repaid:
## :       :...personal_status in {married male,divorced male}: no (14.5/1.5)
## :           personal_status = female:
## :           :...employment_length in {> 7 yrs,4 - 7 yrs}: no (8.2)
## :           :   employment_length in {1 - 4 yrs,0 - 1 yrs,unemployed}:
## :           :   :...existing_credits > 1: yes (5.3)
## :           :       existing_credits <= 1:
## :           :       :...savings_balance in {101 - 500 DM,unknown,
## :           :           :                   > 1000 DM}: no (8.3)
## :           :           savings_balance in {< 100 DM,501 - 1000 DM}:
## :           :           :...age <= 33: yes (21.3/4.8)
## :           :               age > 33: no (4)
## :           personal_status = single male:
## :           :...property in {real estate,unknown/none}: no (17.3)
## :               property in {building society savings,other}:
## :               :...other_debtors = guarantor: yes (2.9/0.6)
## :                   other_debtors = co-applicant: no (0.2)
## :                   other_debtors = none:
## :                   :...installment_rate <= 2: yes (11.4/5.4)
## :                       installment_rate > 2:
## :                       :...age <= 23: yes (3.1)
## :                           age > 23:
## :                           :...purpose in {car (new),business,furniture,
## :                               :           radio/tv,repairs,car (used),
## :                               :           retraining,others,
## :                               :           domestic appliances}: no (20.6)
## :                               purpose = education: yes (2.1)
## checking_balance in {< 0 DM,1 - 200 DM,> 200 DM}:
## :...credit_history in {fully repaid this bank,fully repaid}:
##     :...housing = rent: yes (14.8/0.2)
##     :   housing in {own,for free}:
##     :   :...other_debtors in {guarantor,co-applicant}: no (3.9)
##     :       other_debtors = none:
##     :       :...personal_status = married male: no (3.8)
##     :           personal_status in {single male,female,divorced male}:
##     :           :...installment_rate <= 3:
##     :               :...installment_plan in {none,stores}: yes (16.6/4.4)
##     :               :   installment_plan = bank: no (13.1/4.4)
##     :               installment_rate > 3:
##     :               :...age <= 23: no (2.4)
##     :                   age > 23: yes (21.6/0.6)
##     credit_history in {repaid,critical,delayed}:
##     :...months_loan_duration <= 27:
##         :...purpose in {business,repairs,car (used),others}: no (75.1/23.1)
##         :   purpose in {retraining,domestic appliances}: yes (7.3/3)
##         :   purpose = car (new):
##         :   :...months_loan_duration > 22: yes (17/1.1)
##         :   :   months_loan_duration <= 22:
##         :   :   :...installment_plan in {none,stores}: no (80.2/28.9)
##         :   :       installment_plan = bank: yes (12.9/5.1)
##         :   purpose = education:
##         :   :...savings_balance in {101 - 500 DM,> 1000 DM,
##         :   :   :                   501 - 1000 DM}: yes (0)
##         :   :   savings_balance = unknown: no (3)
##         :   :   savings_balance = < 100 DM:
##         :   :   :...checking_balance = < 0 DM: yes (10.2)
##         :   :       checking_balance in {1 - 200 DM,> 200 DM}: no (9.7/3.7)
##         :   purpose = furniture:
##         :   :...employment_length in {4 - 7 yrs,0 - 1 yrs}: no (27.1/5)
##         :   :   employment_length = unemployed: yes (8.3/3.7)
##         :   :   employment_length = > 7 yrs:
##         :   :   :...residence_history <= 3: yes (8.7/1.8)
##         :   :   :   residence_history > 3: no (14.5/2)
##         :   :   employment_length = 1 - 4 yrs:
##         :   :   :...residence_history > 3: yes (13.8/1.9)
##         :   :       residence_history <= 3:
##         :   :       :...residence_history <= 1: yes (5.2/0.9)
##         :   :           residence_history > 1: no (24.8/4.6)
##         :   purpose = radio/tv:
##         :   :...installment_plan = stores: yes (4.7)
##         :       installment_plan in {none,bank}:
##         :       :...other_debtors in {guarantor,co-applicant}: no (6.7)
##         :           other_debtors = none:
##         :           :...months_loan_duration <= 7: no (7.5)
##         :               months_loan_duration > 7:
##         :               :...employment_length in {> 7 yrs,4 - 7 yrs}:
##         :                   :...amount <= 939: yes (5.1/1.4)
##         :                   :   amount > 939: no (17.3)
##         :                   employment_length in {1 - 4 yrs,0 - 1 yrs,
##         :                   :                     unemployed}: [S1]
##         months_loan_duration > 27:
##         :...employment_length = unemployed: no (9.7/1.5)
##             employment_length in {1 - 4 yrs,> 7 yrs,4 - 7 yrs,0 - 1 yrs}:
##             :...other_debtors = co-applicant: yes (6.9)
##                 other_debtors in {guarantor,none}:
##                 :...residence_history <= 1: no (16.4/6.1)
##                     residence_history > 1:
##                     :...employment_length = 0 - 1 yrs: yes (10.6)
##                         employment_length in {1 - 4 yrs,> 7 yrs,4 - 7 yrs}:
##                         :...property in {real estate,unknown/none,
##                             :            other}: yes (52/12)
##                             property = building society savings:
##                             :...existing_credits > 1: no (9.8/0.7)
##                                 existing_credits <= 1:
##                                 :...other_debtors = guarantor: no (1.5)
##                                     other_debtors = none: yes (16.8/5.6)
## 
## SubTree [S1]
## 
## property in {unknown/none,building society savings}: yes (22.7/6.1)
## property = other: no (21/6.1)
## property = real estate:
## :...credit_history in {repaid,delayed}: yes (29.8/8.6)
##     credit_history = critical: no (1.4)
## 
## -----  Trial 8:  -----
## 
## Decision tree:
## 
## checking_balance = unknown: no (265.4/71.9)
## checking_balance in {< 0 DM,1 - 200 DM,> 200 DM}:
## :...credit_history = fully repaid this bank: yes (37.7/10.9)
##     credit_history = delayed:
##     :...checking_balance = < 0 DM: yes (10.5/1.4)
##     :   checking_balance in {1 - 200 DM,> 200 DM}:
##     :   :...age <= 55: no (27.6/5.9)
##     :       age > 55: yes (4.2)
##     credit_history = critical:
##     :...purpose in {business,car (used),retraining,
##     :   :           domestic appliances}: no (26.8/5.6)
##     :   purpose in {education,repairs,others}: yes (16.8/4.1)
##     :   purpose = furniture:
##     :   :...property in {real estate,other}: yes (13.7/2.6)
##     :   :   property in {unknown/none,building society savings}: no (20.6/4.9)
##     :   purpose = radio/tv:
##     :   :...age <= 43: yes (16.4/5.3)
##     :   :   age > 43: no (7)
##     :   purpose = car (new):
##     :   :...employment_length in {1 - 4 yrs,0 - 1 yrs}: no (12.3)
##     :       employment_length in {> 7 yrs,4 - 7 yrs,unemployed}:
##     :       :...months_loan_duration <= 11: no (5.6)
##     :           months_loan_duration > 11: yes (27.5/6.1)
##     credit_history = fully repaid:
##     :...housing in {rent,for free}: yes (8.3)
##     :   housing = own:
##     :   :...installment_rate > 3: yes (4)
##     :       installment_rate <= 3:
##     :       :...amount <= 12976: no (17.9/3.6)
##     :           amount > 12976: yes (3.5)
##     credit_history = repaid:
##     :...amount > 6260: yes (58.5/14.9)
##         amount <= 6260:
##         :...savings_balance = > 1000 DM: no (8.4)
##             savings_balance in {101 - 500 DM,< 100 DM,unknown,501 - 1000 DM}:
##             :...other_debtors = guarantor: no (11.1/1.7)
##                 other_debtors = co-applicant: yes (9.6/3.9)
##                 other_debtors = none:
##                 :...purpose in {car (new),business,education,
##                     :           domestic appliances}: yes (93.5/36.3)
##                     purpose in {repairs,car (used),retraining,
##                     :           others}: no (30.6/9.4)
##                     purpose = radio/tv:
##                     :...savings_balance = 101 - 500 DM: yes (8.4/2.5)
##                     :   savings_balance in {unknown,
##                     :   :                   501 - 1000 DM}: no (20/4.5)
##                     :   savings_balance = < 100 DM:
##                     :   :...personal_status = married male: no (10.9/4.1)
##                     :       personal_status = divorced male: yes (2.8)
##                     :       personal_status = female:
##                     :       :...months_loan_duration <= 18: yes (16.7/5)
##                     :       :   months_loan_duration > 18: no (7.9/0.2)
##                     :       personal_status = single male:
##                     :       :...installment_plan = bank: no (1.3)
##                     :           installment_plan = stores: yes (2.6)
##                     :           installment_plan = none:
##                     :           :...months_loan_duration <= 13: no (11.5)
##                     :               months_loan_duration > 13: yes (14.8/5.1)
##                     purpose = furniture:
##                     :...housing = for free: no (6.1)
##                         housing in {rent,own}:
##                         :...age > 44: no (6.4)
##                             age <= 44:
##                             :...savings_balance in {101 - 500 DM,unknown,
##                                 :                   501 - 1000 DM}: yes (8.2/1)
##                                 savings_balance = < 100 DM: [S1]
## 
## SubTree [S1]
## 
## personal_status in {single male,married male,divorced male}: no (25.8/10.4)
## personal_status = female:
## :...employment_length in {1 - 4 yrs,unemployed}: yes (8.2)
##     employment_length in {> 7 yrs,4 - 7 yrs,0 - 1 yrs}: no (11.2/2.2)
## 
## -----  Trial 9:  -----
## 
## Decision tree:
## 
## checking_balance in {unknown,> 200 DM}:
## :...purpose in {education,radio/tv,repairs,retraining,others,
## :   :           domestic appliances}: no (121.3/32.7)
## :   purpose = car (used):
## :   :...amount <= 10974: no (25)
## :   :   amount > 10974: yes (2.7)
## :   purpose = business:
## :   :...existing_credits > 2: yes (2.7)
## :   :   existing_credits <= 2:
## :   :   :...employment_length in {0 - 1 yrs,unemployed}: yes (13.8/1.7)
## :   :       employment_length in {1 - 4 yrs,> 7 yrs,4 - 7 yrs}:
## :   :       :...credit_history in {repaid,critical,delayed,
## :   :           :                  fully repaid this bank}: no (18.6/0.6)
## :   :           credit_history = fully repaid: yes (3.2)
## :   purpose = car (new):
## :   :...residence_history <= 1: no (6.9)
## :   :   residence_history > 1:
## :   :   :...months_loan_duration <= 9: no (6.6)
## :   :       months_loan_duration > 9:
## :   :       :...other_debtors = guarantor: yes (2.5)
## :   :           other_debtors = co-applicant: no (0.7)
## :   :           other_debtors = none:
## :   :           :...credit_history in {repaid,delayed,
## :   :               :                  fully repaid}: no (35.8/12.9)
## :   :               credit_history = fully repaid this bank: yes (2.4)
## :   :               credit_history = critical:
## :   :               :...residence_history <= 2: yes (12.7/0.2)
## :   :                   residence_history > 2: no (10.3/2.7)
## :   purpose = furniture:
## :   :...employment_length in {> 7 yrs,4 - 7 yrs}: no (11.6)
## :       employment_length in {1 - 4 yrs,0 - 1 yrs,unemployed}:
## :       :...other_debtors in {guarantor,co-applicant}: yes (4.3)
## :           other_debtors = none:
## :           :...months_loan_duration > 30: yes (7.7/0.4)
## :               months_loan_duration <= 30:
## :               :...existing_credits > 1: no (6.2)
## :                   existing_credits <= 1:
## :                   :...credit_history in {critical,delayed,
## :                       :                  fully repaid this bank,
## :                       :                  fully repaid}: no (1.8)
## :                       credit_history = repaid:
## :                       :...installment_plan = bank: yes (3/0.5)
## :                           installment_plan = stores: no (1.6)
## :                           installment_plan = none:
## :                           :...age <= 27: no (6.9)
## :                               age > 27: yes (11.8/2.7)
## checking_balance in {< 0 DM,1 - 200 DM}:
## :...savings_balance in {> 1000 DM,501 - 1000 DM}: no (34.9/12.9)
##     savings_balance = 101 - 500 DM:
##     :...employment_length in {1 - 4 yrs,0 - 1 yrs,unemployed}: yes (28.8/8.8)
##     :   employment_length in {> 7 yrs,4 - 7 yrs}: no (27/6.9)
##     savings_balance = unknown:
##     :...other_debtors in {guarantor,co-applicant}: no (4.9)
##     :   other_debtors = none:
##     :   :...existing_credits > 1: no (11.3/1.5)
##     :       existing_credits <= 1:
##     :       :...amount > 10297: yes (4.4/1)
##     :           amount <= 10297:
##     :           :...months_loan_duration <= 10: no (7.2)
##     :               months_loan_duration > 10:
##     :               :...personal_status in {single male,
##     :                   :                   married male}: yes (25.2/10.6)
##     :                   personal_status = divorced male: no (1.9)
##     :                   personal_status = female:
##     :                   :...installment_rate <= 3: no (12.9/1.5)
##     :                       installment_rate > 3: yes (11.2/3.5)
##     savings_balance = < 100 DM:
##     :...months_loan_duration > 15:
##         :...housing = rent:
##         :   :...existing_credits > 1: yes (11.3/0.9)
##         :   :   existing_credits <= 1:
##         :   :   :...months_loan_duration <= 22: no (13.6/3.9)
##         :   :       months_loan_duration > 22:
##         :   :       :...age <= 46: yes (18.3/1.7)
##         :   :           age > 46: no (3.1/0.3)
##         :   housing = for free:
##         :   :...personal_status in {married male,divorced male}: no (0)
##         :   :   personal_status = female: yes (10.4/2.2)
##         :   :   personal_status = single male:
##         :   :   :...credit_history in {delayed,fully repaid}: yes (3.8)
##         :   :       credit_history in {repaid,critical,fully repaid this bank}:
##         :   :       :...employment_length = 1 - 4 yrs: yes (2.4)
##         :   :           employment_length in {> 7 yrs,4 - 7 yrs,0 - 1 yrs,
##         :   :                                 unemployed}: no (19.7/1.2)
##         :   housing = own:
##         :   :...installment_plan in {bank,stores}: yes (32/9.3)
##         :       installment_plan = none:
##         :       :...purpose in {car (new),business,education,retraining,
##         :           :           domestic appliances}: yes (41.5/14.5)
##         :           purpose in {repairs,car (used),others}: no (22/7.3)
##         :           purpose = radio/tv:
##         :           :...employment_length in {1 - 4 yrs,4 - 7 yrs,0 - 1 yrs,
##         :           :   :                     unemployed}: yes (25.1/6.4)
##         :           :   employment_length = > 7 yrs: no (4.7)
##         :           purpose = furniture:
##         :           :...existing_credits > 1: no (5)
##         :               existing_credits <= 1:
##         :               :...residence_history <= 1: no (4)
##         :                   residence_history > 1: yes (20.2/4.1)
##         months_loan_duration <= 15:
##         :...purpose in {business,radio/tv,car (used),retraining,others,
##             :           domestic appliances}: no (57/12.2)
##             purpose in {education,repairs}: yes (15/3.9)
##             purpose = furniture:
##             :...amount <= 5743: no (38.3/12.5)
##             :   amount > 5743: yes (2.3)
##             purpose = car (new):
##             :...residence_history <= 1: yes (4.8)
##                 residence_history > 1:
##                 :...employment_length = > 7 yrs: yes (11.4/1.3)
##                     employment_length in {1 - 4 yrs,4 - 7 yrs,0 - 1 yrs,
##                     :                     unemployed}:
##                     :...checking_balance = 1 - 200 DM: no (8.2)
##                         checking_balance = < 0 DM:
##                         :...residence_history > 3: no (8.7/0.2)
##                             residence_history <= 3: [S1]
## 
## SubTree [S1]
## 
## credit_history in {repaid,fully repaid this bank}: yes (15.1/4.2)
## credit_history in {critical,delayed,fully repaid}: no (7.1)
## 
## 
## Evaluation on training data (900 cases):
## 
## Trial        Decision Tree   
## -----      ----------------  
##    Size      Errors  
## 
##    0     69  101(11.2%)
##    1     41  161(17.9%)
##    2     60  181(20.1%)
##    3     65  146(16.2%)
##    4     49  195(21.7%)
##    5     50  211(23.4%)
##    6     63  180(20.0%)
##    7     66  177(19.7%)
##    8     40  178(19.8%)
##    9     61  146(16.2%)
## boost             22( 2.4%)   <<
## 
## 
##     (a)   (b)    <-classified as
##    ----  ----
##     633     3    (a): class no
##      19   245    (b): class yes
## 
## 
##  Attribute usage:
## 
##  100.00% checking_balance
##  100.00% credit_history
##  100.00% amount
##   99.11% purpose
##   95.00% months_loan_duration
##   90.33% installment_plan
##   89.00% other_debtors
##   88.89% employment_length
##   86.89% savings_balance
##   83.44% personal_status
##   77.67% property
##   76.89% age
##   69.89% installment_rate
##   68.78% residence_history
##   62.33% existing_credits
##   39.56% housing
## 
## 
## Time: 0.1 secs