This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
library(readxl)
library(C50)
library(gmodels)
library(crosstable)
credit <- read.csv("C:/Users/Olateru-Olagbegi9176/Downloads/credit.csv")
View(credit)
set.seed(12345)
credit_rand<-credit[order(runif(1000)),]
Credit_train<-credit_rand[1:900,]
Credit_test<-credit_rand[900:1000,]
Credit_train$default<-as.factor(Credit_train$default)
Credit_model<-C5.0(Credit_train[-17], Credit_train$default)
Credit_model
##
## Call:
## C5.0.default(x = Credit_train[-17], y = Credit_train$default)
##
## Classification Tree
## Number of samples: 900
## Number of predictors: 20
##
## Tree size: 57
##
## Non-standard options: attempt to group attributes
summary(Credit_model)
##
## Call:
## C5.0.default(x = Credit_train[-17], y = Credit_train$default)
##
##
## C5.0 [Release 2.07 GPL Edition] Thu Apr 10 14:19:07 2025
## -------------------------------
##
## Class specified by attribute `outcome'
##
## Read 900 cases (21 attributes) from undefined.data
##
## Decision tree:
##
## checking_balance = unknown: 1 (358/44)
## checking_balance in {< 0 DM,1 - 200 DM,> 200 DM}:
## :...foreign_worker = no:
## :...installment_plan in {none,stores}: 1 (17/1)
## : installment_plan = bank:
## : :...residence_history <= 3: 2 (2)
## : residence_history > 3: 1 (2)
## foreign_worker = yes:
## :...credit_history in {fully repaid,fully repaid this bank}: 2 (61/20)
## credit_history in {critical,repaid,delayed}:
## :...months_loan_duration <= 11: 1 (76/13)
## months_loan_duration > 11:
## :...savings_balance = > 1000 DM: 1 (13)
## savings_balance in {< 100 DM,101 - 500 DM,501 - 1000 DM,
## : unknown}:
## :...checking_balance = > 200 DM:
## :...dependents > 1: 2 (3)
## : dependents <= 1:
## : :...credit_history in {repaid,delayed}: 1 (23/3)
## : credit_history = critical:
## : :...amount <= 2337: 2 (3)
## : amount > 2337: 1 (6)
## checking_balance = < 0 DM:
## :...other_debtors = guarantor:
## : :...credit_history = critical: 2 (1)
## : : credit_history in {repaid,delayed}: 1 (11/1)
## : other_debtors in {none,co-applicant}:
## : :...job = mangement self-employed: 1 (26/6)
## : job in {unskilled resident,skilled employee,
## : : unemployed non-resident}:
## : :...purpose in {radio/tv,others,repairs,
## : : domestic appliances,
## : : retraining}: 2 (33/10)
## : purpose = education: [S1]
## : purpose = business:
## : :...job in {unskilled resident,
## : : : unemployed non-resident}: 1 (3)
## : : job = skilled employee: 2 (3)
## : purpose = car (new): [S2]
## : purpose = car (used):
## : :...amount > 6229: 2 (5)
## : : amount <= 6229: [S3]
## : purpose = furniture:
## : :...months_loan_duration > 27: 2 (9/1)
## : months_loan_duration <= 27: [S4]
## checking_balance = 1 - 200 DM:
## :...savings_balance = unknown: 1 (34/6)
## savings_balance in {< 100 DM,101 - 500 DM,
## : 501 - 1000 DM}:
## :...months_loan_duration > 45: 2 (11/1)
## months_loan_duration <= 45:
## :...installment_plan = stores:
## :...age <= 35: 2 (4)
## : age > 35: 1 (2)
## installment_plan = bank:
## :...residence_history <= 1: 1 (3)
## : residence_history > 1:
## : :...existing_credits <= 1: 2 (5)
## : existing_credits > 1:
## : :...installment_rate > 2: 2 (3)
## : installment_rate <= 2: [S5]
## installment_plan = none:
## :...other_debtors = guarantor: 1 (7/1)
## other_debtors = co-applicant: 2 (3/1)
## other_debtors = none:
## :...employment_length = 4 - 7 yrs:
## :...age <= 41: 1 (16)
## : age > 41: 2 (3/1)
## employment_length in {> 7 yrs,
## : 1 - 4 yrs,
## : 0 - 1 yrs,
## : unemployed}:
## :...amount > 7980: 2 (7)
## amount <= 7980:
## :...amount > 4746: 1 (10)
## amount <= 4746: [S6]
##
## SubTree [S1]
##
## savings_balance in {< 100 DM,101 - 500 DM,501 - 1000 DM}: 2 (6)
## savings_balance = unknown: 1 (2)
##
## SubTree [S2]
##
## savings_balance = 101 - 500 DM: 1 (1)
## savings_balance in {501 - 1000 DM,unknown}: 2 (4)
## savings_balance = < 100 DM:
## :...personal_status in {single male,female,divorced male}: 2 (29/6)
## personal_status = married male: 1 (2)
##
## SubTree [S3]
##
## job = unskilled resident: 2 (1)
## job in {skilled employee,unemployed non-resident}: 1 (8/1)
##
## SubTree [S4]
##
## employment_length in {> 7 yrs,4 - 7 yrs}: 1 (7/1)
## employment_length = unemployed: 2 (2)
## employment_length = 0 - 1 yrs:
## :...job = unskilled resident: 2 (1)
## : job in {skilled employee,unemployed non-resident}: 1 (4)
## employment_length = 1 - 4 yrs:
## :...property in {building society savings,unknown/none}: 1 (5)
## property in {other,real estate}:
## :...residence_history <= 2: 1 (4/1)
## residence_history > 2: 2 (5)
##
## SubTree [S5]
##
## other_debtors in {none,guarantor}: 1 (3)
## other_debtors = co-applicant: 2 (1)
##
## SubTree [S6]
##
## housing = for free: 1 (2)
## housing = rent:
## :...credit_history = critical: 1 (1)
## : credit_history in {repaid,delayed}: 2 (10/2)
## housing = own:
## :...savings_balance = 101 - 500 DM: 1 (6)
## savings_balance in {< 100 DM,501 - 1000 DM}:
## :...residence_history <= 1: 1 (8/1)
## residence_history > 1:
## :...installment_rate <= 1: 1 (2)
## installment_rate > 1:
## :...employment_length in {> 7 yrs,unemployed}: 1 (13/6)
## employment_length in {1 - 4 yrs,0 - 1 yrs}: 2 (10)
##
##
## Evaluation on training data (900 cases):
##
## Decision Tree
## ----------------
## Size Errors
##
## 57 127(14.1%) <<
##
##
## (a) (b) <-classified as
## ---- ----
## 590 42 (a): class 1
## 85 183 (b): class 2
##
##
## Attribute usage:
##
## 100.00% checking_balance
## 60.22% foreign_worker
## 57.89% credit_history
## 51.11% months_loan_duration
## 42.67% savings_balance
## 30.44% other_debtors
## 17.78% job
## 15.56% installment_plan
## 14.89% purpose
## 12.89% employment_length
## 10.22% amount
## 6.78% residence_history
## 5.78% housing
## 3.89% dependents
## 3.56% installment_rate
## 3.44% personal_status
## 2.78% age
## 1.56% property
## 1.33% existing_credits
##
##
## Time: 0.0 secs
Credit_pred<-predict(Credit_model,Credit_test[-17])
Credit_pred
## [1] 2 1 2 1 1 1 2 1 1 2 2 1 1 1 2 2 2 1 1 2 1 2 1 2 1 2 1 2 1 1 1 2 2 1 2 1 1
## [38] 1 1 2 2 1 1 1 2 2 2 2 1 2 1 1 1 2 1 1 1 1 2 1 1 1 2 1 2 1 1 2 1 1 1 1 1 1
## [75] 2 2 1 1 2 1 1 1 1 1 1 1 1 1 1 2 2 2 1 1 1 1 2 1 2 1 1
## Levels: 1 2
Credit_test$default<-as.factor(Credit_test$default)
CrossTable(Credit_test$default,Credit_pred,prop.chisp=FALSE,prop.c=FALSE,prop.r=FALSE,dnn=c('actual default','predicted default'))
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 101
##
##
## | predicted default
## actual default | 1 | 2 | Row Total |
## ---------------|-----------|-----------|-----------|
## 1 | 54 | 14 | 68 |
## | 2.395 | 4.324 | |
## | 0.535 | 0.139 | |
## ---------------|-----------|-----------|-----------|
## 2 | 11 | 22 | 33 |
## | 4.935 | 8.911 | |
## | 0.109 | 0.218 | |
## ---------------|-----------|-----------|-----------|
## Column Total | 65 | 36 | 101 |
## ---------------|-----------|-----------|-----------|
##
##
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] Thu Apr 10 14:19:07 2025
## -------------------------------
##
## Class specified by attribute `outcome'
##
## Read 900 cases (21 attributes) from undefined.data
##
## ----- Trial 0: -----
##
## Decision tree:
##
## checking_balance = unknown: 1 (358/44)
## checking_balance in {< 0 DM,1 - 200 DM,> 200 DM}:
## :...foreign_worker = no:
## :...installment_plan in {none,stores}: 1 (17/1)
## : installment_plan = bank:
## : :...residence_history <= 3: 2 (2)
## : residence_history > 3: 1 (2)
## foreign_worker = yes:
## :...credit_history in {fully repaid,fully repaid this bank}: 2 (61/20)
## credit_history in {critical,repaid,delayed}:
## :...months_loan_duration <= 11: 1 (76/13)
## months_loan_duration > 11:
## :...savings_balance = > 1000 DM: 1 (13)
## savings_balance in {< 100 DM,101 - 500 DM,501 - 1000 DM,
## : unknown}:
## :...checking_balance = > 200 DM:
## :...dependents > 1: 2 (3)
## : dependents <= 1:
## : :...credit_history in {repaid,delayed}: 1 (23/3)
## : credit_history = critical:
## : :...amount <= 2337: 2 (3)
## : amount > 2337: 1 (6)
## checking_balance = < 0 DM:
## :...other_debtors = guarantor:
## : :...credit_history = critical: 2 (1)
## : : credit_history in {repaid,delayed}: 1 (11/1)
## : other_debtors in {none,co-applicant}:
## : :...job = mangement self-employed: 1 (26/6)
## : job in {unskilled resident,skilled employee,
## : : unemployed non-resident}:
## : :...purpose in {radio/tv,others,repairs,
## : : domestic appliances,
## : : retraining}: 2 (33/10)
## : purpose = education: [S1]
## : purpose = business:
## : :...job in {unskilled resident,
## : : : unemployed non-resident}: 1 (3)
## : : job = skilled employee: 2 (3)
## : purpose = car (new): [S2]
## : purpose = car (used):
## : :...amount > 6229: 2 (5)
## : : amount <= 6229: [S3]
## : purpose = furniture:
## : :...months_loan_duration > 27: 2 (9/1)
## : months_loan_duration <= 27: [S4]
## checking_balance = 1 - 200 DM:
## :...savings_balance = unknown: 1 (34/6)
## savings_balance in {< 100 DM,101 - 500 DM,
## : 501 - 1000 DM}:
## :...months_loan_duration > 45: 2 (11/1)
## months_loan_duration <= 45:
## :...installment_plan = stores:
## :...age <= 35: 2 (4)
## : age > 35: 1 (2)
## installment_plan = bank:
## :...residence_history <= 1: 1 (3)
## : residence_history > 1:
## : :...existing_credits <= 1: 2 (5)
## : existing_credits > 1:
## : :...installment_rate > 2: 2 (3)
## : installment_rate <= 2: [S5]
## installment_plan = none:
## :...other_debtors = guarantor: 1 (7/1)
## other_debtors = co-applicant: 2 (3/1)
## other_debtors = none:
## :...employment_length = 4 - 7 yrs:
## :...age <= 41: 1 (16)
## : age > 41: 2 (3/1)
## employment_length in {> 7 yrs,
## : 1 - 4 yrs,
## : 0 - 1 yrs,
## : unemployed}:
## :...amount > 7980: 2 (7)
## amount <= 7980:
## :...amount > 4746: 1 (10)
## amount <= 4746: [S6]
##
## SubTree [S1]
##
## savings_balance in {< 100 DM,101 - 500 DM,501 - 1000 DM}: 2 (6)
## savings_balance = unknown: 1 (2)
##
## SubTree [S2]
##
## savings_balance = 101 - 500 DM: 1 (1)
## savings_balance in {501 - 1000 DM,unknown}: 2 (4)
## savings_balance = < 100 DM:
## :...personal_status in {single male,female,divorced male}: 2 (29/6)
## personal_status = married male: 1 (2)
##
## SubTree [S3]
##
## job = unskilled resident: 2 (1)
## job in {skilled employee,unemployed non-resident}: 1 (8/1)
##
## SubTree [S4]
##
## employment_length in {> 7 yrs,4 - 7 yrs}: 1 (7/1)
## employment_length = unemployed: 2 (2)
## employment_length = 0 - 1 yrs:
## :...job = unskilled resident: 2 (1)
## : job in {skilled employee,unemployed non-resident}: 1 (4)
## employment_length = 1 - 4 yrs:
## :...property in {building society savings,unknown/none}: 1 (5)
## property in {other,real estate}:
## :...residence_history <= 2: 1 (4/1)
## residence_history > 2: 2 (5)
##
## SubTree [S5]
##
## other_debtors in {none,guarantor}: 1 (3)
## other_debtors = co-applicant: 2 (1)
##
## SubTree [S6]
##
## housing = for free: 1 (2)
## housing = rent:
## :...credit_history = critical: 1 (1)
## : credit_history in {repaid,delayed}: 2 (10/2)
## housing = own:
## :...savings_balance = 101 - 500 DM: 1 (6)
## savings_balance in {< 100 DM,501 - 1000 DM}:
## :...residence_history <= 1: 1 (8/1)
## residence_history > 1:
## :...installment_rate <= 1: 1 (2)
## installment_rate > 1:
## :...employment_length in {> 7 yrs,unemployed}: 1 (13/6)
## employment_length in {1 - 4 yrs,0 - 1 yrs}: 2 (10)
##
## ----- Trial 1: -----
##
## Decision tree:
##
## purpose in {radio/tv,others,car (used),domestic appliances,retraining}:
## :...months_loan_duration <= 8: 1 (26.9)
## : months_loan_duration > 8:
## : :...checking_balance = unknown: 1 (133.6/20.4)
## : checking_balance in {< 0 DM,1 - 200 DM,> 200 DM}:
## : :...installment_plan = stores: 2 (13.1/5.3)
## : installment_plan = none:
## : :...employment_length in {> 7 yrs,1 - 4 yrs,4 - 7 yrs,
## : : : unemployed}: 1 (126.2/41.1)
## : : employment_length = 0 - 1 yrs: 2 (24.1/7.1)
## : installment_plan = bank:
## : :...amount <= 10297: 1 (31.6/4.7)
## : amount > 10297: 2 (2.4)
## purpose in {car (new),furniture,education,business,repairs}:
## :...foreign_worker = no:
## :...checking_balance in {< 0 DM,unknown,> 200 DM}: 1 (19.8/0.8)
## : checking_balance = 1 - 200 DM: 2 (2.3)
## foreign_worker = yes:
## :...property = unknown/none:
## :...checking_balance in {< 0 DM,1 - 200 DM,> 200 DM}: 2 (59.9/16.5)
## : checking_balance = unknown: 1 (28/11.4)
## property in {other,real estate,building society savings}:
## :...savings_balance in {101 - 500 DM,501 - 1000 DM}: 1 (56.4/16.3)
## savings_balance = > 1000 DM:
## :...existing_credits <= 2: 1 (22/0.8)
## : existing_credits > 2: 2 (2.3)
## savings_balance = unknown:
## :...job in {mangement self-employed,
## : : unemployed non-resident}: 1 (7)
## : job in {unskilled resident,skilled employee}:
## : :...purpose in {education,repairs}: 1 (7.1)
## : purpose in {car (new),furniture,business}:
## : :...installment_plan = stores: 1 (1.6)
## : installment_plan = bank: 2 (11.5/3.9)
## : installment_plan = none:
## : :...employment_length in {> 7 yrs,4 - 7 yrs,
## : : unemployed}: 1 (13.4/0.8)
## : employment_length in {1 - 4 yrs,0 - 1 yrs}:
## : :...installment_rate <= 1: 1 (3.2)
## : installment_rate > 1: 2 (19.3/4)
## savings_balance = < 100 DM:
## :...credit_history in {delayed,
## : fully repaid this bank}: 2 (38.6/10.2)
## credit_history in {critical,repaid,fully repaid}:
## :...checking_balance = > 200 DM: 1 (12.6/1.6)
## checking_balance in {< 0 DM,1 - 200 DM,unknown}:
## :...housing = for free: 1 (0.8)
## housing = rent:
## :...installment_plan in {stores,bank}: 2 (6.9)
## : installment_plan = none:
## : :...other_debtors = guarantor: 1 (0.8)
## : other_debtors = co-applicant: 2 (3.1)
## : other_debtors = none:
## : :...months_loan_duration > 22: 2 (13.9/1.6)
## : months_loan_duration <= 22: [S1]
## housing = own:
## :...age > 60: 1 (9.3)
## age <= 60:
## :...existing_credits <= 1:
## :...telephone = none: [S2]
## : telephone = yes: [S3]
## existing_credits > 1:
## :...existing_credits > 2: 1 (5.5)
## existing_credits <= 2:
## :...residence_history <= 1: 1 (8.6)
## residence_history > 1:
## :...installment_rate <= 1: 1 (5.4)
## installment_rate > 1: [S4]
##
## SubTree [S1]
##
## credit_history = fully repaid: 2 (2.4)
## credit_history in {critical,repaid}:
## :...age <= 42: 1 (25/4)
## age > 42: 2 (3.1)
##
## SubTree [S2]
##
## other_debtors in {none,co-applicant}: 2 (59.1/18.2)
## other_debtors = guarantor: 1 (2.4)
##
## SubTree [S3]
##
## property = other: 2 (12.6/3.2)
## property in {real estate,building society savings}: 1 (18.8/1.6)
##
## SubTree [S4]
##
## installment_plan in {stores,bank}: 2 (16.1/2.4)
## installment_plan = none:
## :...employment_length in {> 7 yrs,0 - 1 yrs,unemployed}: 2 (21.6/7.1)
## employment_length in {1 - 4 yrs,4 - 7 yrs}: 1 (21.7/1.6)
##
## ----- Trial 2: -----
##
## Decision tree:
##
## months_loan_duration > 33:
## :...age <= 26: 2 (39.9/4.5)
## : age > 26:
## : :...checking_balance = > 200 DM: 1 (3.1)
## : checking_balance = < 0 DM:
## : :...other_debtors in {none,guarantor}: 2 (31.9/10)
## : : other_debtors = co-applicant: 1 (2.5)
## : checking_balance in {1 - 200 DM,unknown}:
## : :...dependents > 1: 1 (11.5/1.3)
## : dependents <= 1:
## : :...personal_status = divorced male: 2 (5)
## : personal_status in {single male,female,married male}:
## : :...property in {real estate,
## : : building society savings}: 1 (12.4/0.6)
## : property in {other,unknown/none}:
## : :...job = unskilled resident: 2 (0.6)
## : job in {mangement self-employed,
## : : unemployed non-resident}: 1 (28.4/9.1)
## : job = skilled employee:
## : :...age <= 36: 1 (10.7/1.9)
## : age > 36: 2 (17.4/3.2)
## months_loan_duration <= 33:
## :...credit_history = critical:
## :...installment_plan in {none,stores}: 1 (178.5/35.2)
## : installment_plan = bank: 2 (20.4/8.9)
## credit_history in {repaid,delayed,fully repaid,fully repaid this bank}:
## :...foreign_worker = no: 1 (15.6/1.9)
## foreign_worker = yes:
## :...personal_status = married male: 1 (58/19.2)
## personal_status = divorced male:
## :...property in {other,real estate}: 1 (15.1/1.3)
## : property in {building society savings,
## : unknown/none}: 2 (12.5/5)
## personal_status = single male:
## :...employment_length = 0 - 1 yrs: 1 (29.4/7)
## : employment_length = unemployed: 2 (13.7/3.5)
## : employment_length = 4 - 7 yrs:
## : :...other_debtors = none: 1 (36.9/7.8)
## : : other_debtors in {guarantor,co-applicant}: 2 (3.1)
## : employment_length = 1 - 4 yrs:
## : :...housing = rent: 2 (12.2/3.2)
## : : housing in {own,for free}:
## : : :...job = unemployed non-resident: 1 (0)
## : : job = mangement self-employed: 2 (6.8/1.3)
## : : job in {unskilled resident,skilled employee}:
## : : :...telephone = yes: 1 (16.8/0.6)
## : : telephone = none: [S1]
## : employment_length = > 7 yrs:
## : :...amount > 6331: 2 (9.8)
## : amount <= 6331:
## : :...months_loan_duration <= 11: 1 (8.6)
## : months_loan_duration > 11:
## : :...installment_rate <= 2: 1 (7.1/3)
## : installment_rate > 2:
## : :...installment_rate <= 3: 2 (8.6/1.9)
## : installment_rate > 3:
## : :...dependents <= 1: 1 (24.6/5.6)
## : dependents > 1: 2 (14.9/4.5)
## personal_status = female:
## :...credit_history = delayed: 1 (13.7/4.3)
## credit_history in {fully repaid,
## : fully repaid this bank}: 2 (23.3/6.2)
## credit_history = repaid:
## :...age > 53: 1 (11.8)
## age <= 53:
## :...existing_credits > 1: 2 (14.5/1.3)
## existing_credits <= 1:
## :...employment_length = 4 - 7 yrs: 1 (14.3/1.3)
## employment_length in {> 7 yrs,1 - 4 yrs,0 - 1 yrs,
## : unemployed}:
## :...residence_history <= 1: 1 (23/5.3)
## residence_history > 1:
## :...installment_rate > 2: 2 (58.6/15.3)
## installment_rate <= 2:
## :...installment_plan = stores: 1 (0)
## installment_plan = bank: 2 (2.5)
## installment_plan = none:
## :...dependents <= 1: 1 (26.1/7.4)
## dependents > 1: 2 (4.3/0.6)
##
## SubTree [S1]
##
## credit_history in {repaid,delayed,fully repaid this bank}: 1 (49.2/13.1)
## credit_history = fully repaid: 2 (2.5)
##
## ----- Trial 3: -----
##
## Decision tree:
##
## checking_balance in {< 0 DM,1 - 200 DM}:
## :...other_debtors = guarantor: 1 (31.9/9.6)
## : other_debtors in {none,co-applicant}:
## : :...savings_balance = 501 - 1000 DM: 2 (15.5/7)
## : savings_balance = > 1000 DM: 1 (14/3.8)
## : savings_balance = unknown:
## : :...credit_history in {critical,delayed,fully repaid}: 1 (19.2)
## : : credit_history in {repaid,fully repaid this bank}:
## : : :...other_debtors = co-applicant: 1 (3)
## : : other_debtors = none:
## : : :...job in {unskilled resident,
## : : : unemployed non-resident}: 1 (8.3/1.3)
## : : job in {skilled employee,
## : : mangement self-employed}: 2 (39.5/14.4)
## : savings_balance = 101 - 500 DM:
## : :...personal_status in {female,divorced male,married male}: 2 (24.2/4.2)
## : : personal_status = single male:
## : : :...other_debtors = co-applicant: 2 (1.3)
## : : other_debtors = none:
## : : :...existing_credits > 3: 2 (2.2)
## : : existing_credits <= 3:
## : : :...dependents <= 1: 1 (18/3.9)
## : : dependents > 1: 2 (5.5/1.6)
## : savings_balance = < 100 DM:
## : :...job = unemployed non-resident: 2 (6.3/2)
## : job = unskilled resident:
## : :...property in {other,unknown/none}: 2 (22.2/6.4)
## : : property in {real estate,
## : : building society savings}: 1 (52.5/15.3)
## : job = mangement self-employed:
## : :...residence_history <= 1: 1 (6.6)
## : : residence_history > 1:
## : : :...checking_balance = 1 - 200 DM:
## : : :...personal_status = single male: 1 (11.2/4.7)
## : : : personal_status in {female,divorced male,
## : : : married male}: 2 (20.2/1.1)
## : : checking_balance = < 0 DM:
## : : :...installment_rate <= 1: 2 (4)
## : : installment_rate > 1:
## : : :...amount <= 7166: 1 (23.8/4)
## : : amount > 7166: 2 (5.6/1.1)
## : job = skilled employee:
## : :...installment_rate <= 2:
## : :...foreign_worker = no: 2 (2.5)
## : : foreign_worker = yes:
## : : :...age > 26: 1 (37.4/9.4)
## : : age <= 26:
## : : :...residence_history <= 2: 2 (16.9/1.8)
## : : residence_history > 2: 1 (9.1/3.3)
## : installment_rate > 2:
## : :...personal_status in {divorced male,
## : : married male}: 2 (21.2/7.1)
## : personal_status = female:
## : :...employment_length = > 7 yrs: 1 (4.7/0.5)
## : : employment_length in {1 - 4 yrs,4 - 7 yrs,0 - 1 yrs,
## : : unemployed}: 2 (36.8/7.7)
## : personal_status = single male:
## : :...months_loan_duration <= 11: 1 (3.9)
## : months_loan_duration > 11:
## : :...other_debtors = co-applicant: 2 (2.6)
## : other_debtors = none:
## : :...residence_history <= 1: 1 (4.6)
## : residence_history > 1: 2 (48.1/11.4)
## checking_balance in {unknown,> 200 DM}:
## :...foreign_worker = no: 1 (9)
## foreign_worker = yes:
## :...installment_plan = bank:
## :...other_debtors in {guarantor,co-applicant}: 1 (4.1)
## : other_debtors = none:
## : :...amount > 3711: 2 (21.1/3.2)
## : amount <= 3711:
## : :...age > 41: 1 (10.1)
## : age <= 41:
## : :...job in {unskilled resident,skilled employee,
## : : unemployed non-resident}: 2 (21.4/8.6)
## : job = mangement self-employed: 1 (3.4)
## installment_plan in {none,stores}:
## :...purpose in {others,car (used),domestic appliances,
## : retraining}: 1 (35.1)
## purpose in {car (new),radio/tv,furniture,education,business,
## : repairs}:
## :...employment_length in {> 7 yrs,4 - 7 yrs}:
## :...credit_history = fully repaid this bank: 1 (0)
## : credit_history = delayed: 2 (16.8/7.8)
## : credit_history in {critical,repaid,fully repaid}:
## : :...amount <= 8648: 1 (91.4/11.1)
## : amount > 8648: 2 (5.5/1.8)
## employment_length in {1 - 4 yrs,0 - 1 yrs,unemployed}:
## :...other_debtors in {guarantor,co-applicant}: 2 (11.9/2.9)
## other_debtors = none:
## :...amount > 4153:
## :...job = unemployed non-resident: 2 (0)
## : job = unskilled resident: 1 (2.1)
## : job in {skilled employee,mangement self-employed}:
## : :...months_loan_duration <= 39: 2 (30/4.5)
## : months_loan_duration > 39: 1 (2)
## amount <= 4153:
## :...property = building society savings: 1 (15.4)
## property in {other,real estate,unknown/none}:
## :...checking_balance = > 200 DM:
## :...months_loan_duration <= 22: 2 (18.8/5.4)
## : months_loan_duration > 22: 1 (3.4)
## checking_balance = unknown:
## :...purpose in {car (new),
## : radio/tv}: 1 (37.2/1.5)
## purpose in {furniture,education,business,
## : repairs}:
## :...installment_rate <= 3: 1 (11.4)
## installment_rate > 3: [S1]
##
## SubTree [S1]
##
## installment_plan = stores: 2 (5)
## installment_plan = none:
## :...personal_status in {single male,divorced male}: 1 (6.2)
## personal_status in {female,married male}: 2 (15.6/2.9)
##
## ----- Trial 4: -----
##
## Decision tree:
##
## checking_balance in {unknown,> 200 DM}:
## :...foreign_worker = no: 1 (7.3)
## : foreign_worker = yes:
## : :...purpose in {furniture,education,others,car (used),domestic appliances,
## : : retraining}: 1 (119.3/30.8)
## : purpose = repairs: 2 (6.4/3.2)
## : purpose = business:
## : :...employment_length in {> 7 yrs,1 - 4 yrs,4 - 7 yrs}: 1 (29.9/7.8)
## : : employment_length in {0 - 1 yrs,unemployed}: 2 (11/1.2)
## : purpose = car (new):
## : :...installment_plan = bank: 2 (13.5/4.3)
## : : installment_plan in {none,stores}:
## : : :...amount <= 11760: 1 (56/13.3)
## : : amount > 11760: 2 (3)
## : purpose = radio/tv:
## : :...credit_history in {critical,delayed,
## : : fully repaid this bank}: 1 (47/5.8)
## : credit_history = fully repaid: 2 (1.5/0.4)
## : credit_history = repaid:
## : :...existing_credits > 1: 2 (11.1/2.6)
## : existing_credits <= 1:
## : :...age > 28: 1 (23.1)
## : age <= 28:
## : :...months_loan_duration <= 10: 2 (6.5)
## : months_loan_duration > 10: 1 (19.5/6)
## checking_balance in {< 0 DM,1 - 200 DM}:
## :...savings_balance in {501 - 1000 DM,unknown,> 1000 DM}: 1 (111.6/34.6)
## savings_balance in {< 100 DM,101 - 500 DM}:
## :...months_loan_duration > 47: 2 (31.9/5.1)
## months_loan_duration <= 47:
## :...purpose in {education,domestic appliances}: 2 (20.9/6.4)
## purpose in {business,others,repairs,retraining}: 1 (51/17.6)
## purpose = car (used):
## :...personal_status in {single male,divorced male,
## : : married male}: 1 (24.1/4.1)
## : personal_status = female: 2 (4.9/0.9)
## purpose = furniture:
## :...other_debtors = guarantor: 1 (4.6)
## : other_debtors in {none,co-applicant}:
## : :...personal_status = married male: 1 (5.4)
## : personal_status in {single male,female,divorced male}:
## : :...installment_plan = stores: 1 (2)
## : installment_plan in {none,bank}:
## : :...housing in {own,rent}: 2 (78/28.1)
## : housing = for free: 1 (5.3/1.2)
## purpose = car (new):
## :...other_debtors in {guarantor,co-applicant}: 2 (13.9/1.5)
## : other_debtors = none:
## : :...credit_history = critical: 1 (23.2/5.9)
## : credit_history in {delayed,fully repaid,
## : : fully repaid this bank}: 2 (21.2/7.1)
## : credit_history = repaid:
## : :...dependents > 1: 1 (8.7/2.5)
## : dependents <= 1:
## : :...months_loan_duration > 40: 1 (2)
## : months_loan_duration <= 40:
## : :...employment_length in {> 7 yrs,1 - 4 yrs,
## : : 4 - 7 yrs,
## : : 0 - 1 yrs}: 2 (34.1/6.4)
## : employment_length = unemployed: 1 (3)
## purpose = radio/tv:
## :...foreign_worker = no: 1 (3.3)
## foreign_worker = yes:
## :...months_loan_duration > 36: 2 (6.6)
## months_loan_duration <= 36:
## :...savings_balance = 101 - 500 DM: 2 (10.4/2.3)
## savings_balance = < 100 DM:
## :...other_debtors in {guarantor,
## : co-applicant}: 1 (13.4/2.1)
## other_debtors = none:
## :...employment_length = 4 - 7 yrs: 1 (5.5)
## employment_length = unemployed: 2 (2.3)
## employment_length in {> 7 yrs,1 - 4 yrs,
## : 0 - 1 yrs}:
## :...job in {mangement self-employed,
## : unemployed non-resident}: 1 (6.3)
## job in {unskilled resident,
## : skilled employee}: [S1]
##
## SubTree [S1]
##
## personal_status in {divorced male,married male}: 2 (9.2)
## personal_status in {single male,female}:
## :...housing = for free: 1 (0)
## housing = rent: 2 (7.6/1.2)
## housing = own:
## :...amount <= 918: 2 (6.6/0.4)
## amount > 918: 1 (27.9/6.5)
##
## ----- Trial 5: -----
##
## Decision tree:
##
## checking_balance = unknown:
## :...employment_length in {> 7 yrs,4 - 7 yrs}:
## : :...months_loan_duration > 24: 1 (28.4)
## : : months_loan_duration <= 24:
## : : :...age <= 22: 2 (7.7/1.2)
## : : age > 22: 1 (86/18.7)
## : employment_length in {1 - 4 yrs,0 - 1 yrs,unemployed}:
## : :...months_loan_duration > 24:
## : :...installment_rate <= 1: 1 (4/1)
## : : installment_rate > 1: 2 (38.8/9.4)
## : months_loan_duration <= 24:
## : :...other_debtors in {guarantor,co-applicant}: 2 (15.7/5.5)
## : other_debtors = none:
## : :...purpose in {car (new),radio/tv,furniture,others,repairs,
## : : car (used),domestic appliances,
## : : retraining}: 1 (79.2/14)
## : purpose in {education,business}:
## : :...amount <= 1800: 1 (3.4)
## : amount > 1800: 2 (20.1/3.7)
## checking_balance in {< 0 DM,1 - 200 DM,> 200 DM}:
## :...foreign_worker = no: 1 (15.5/4.3)
## foreign_worker = yes:
## :...credit_history = delayed:
## :...job = unemployed non-resident: 1 (0)
## : job = mangement self-employed: 2 (15.9/4.2)
## : job in {unskilled resident,skilled employee}:
## : :...checking_balance = < 0 DM: 2 (11.4/4.8)
## : checking_balance in {1 - 200 DM,> 200 DM}: 1 (22.5/0.7)
## credit_history = fully repaid:
## :...housing in {rent,for free}: 2 (7.8)
## : housing = own:
## : :...installment_rate <= 3: 1 (17.2/3.2)
## : installment_rate > 3: 2 (5.5)
## credit_history = fully repaid this bank:
## :...other_debtors = guarantor: 2 (3.9)
## : other_debtors = co-applicant: 1 (3/0.4)
## : other_debtors = none:
## : :...property in {other,real estate}: 1 (19/6.8)
## : property in {building society savings,
## : unknown/none}: 2 (19.9/2)
## credit_history = critical:
## :...savings_balance in {101 - 500 DM,unknown}: 1 (15.2/2.9)
## : savings_balance in {501 - 1000 DM,> 1000 DM}: 2 (16.3/3.6)
## : savings_balance = < 100 DM:
## : :...personal_status = divorced male: 2 (9.2/1.1)
## : personal_status in {single male,female,married male}:
## : :...residence_history <= 1: 1 (5.7)
## : residence_history > 1:
## : :...residence_history <= 2: 2 (20/6.1)
## : residence_history > 2: 1 (61.2/20.1)
## credit_history = repaid:
## :...amount > 8648: 2 (19.9/2.8)
## amount <= 8648:
## :...months_loan_duration <= 8: 1 (18.3/2)
## months_loan_duration > 8:
## :...purpose in {education,business,others,
## : car (used)}: 1 (52.4/16.9)
## purpose in {repairs,domestic appliances,
## : retraining}: 2 (15.2/3.8)
## purpose = furniture:
## :...installment_plan in {none,stores}: 1 (68.1/27.8)
## : installment_plan = bank: 2 (6.2/1.2)
## purpose = car (new):
## :...telephone = yes: 1 (17.8/6)
## : telephone = none:
## : :...age > 32: 2 (19.3/1.8)
## : age <= 32:
## : :...installment_rate <= 2: 1 (8.9/1.8)
## : installment_rate > 2: 2 (25.7/8.1)
## purpose = radio/tv:
## :...employment_length in {> 7 yrs,4 - 7 yrs}: 1 (25.4/7.6)
## employment_length = unemployed: 2 (4.6)
## employment_length = 0 - 1 yrs:
## :...age <= 22: 2 (7.3)
## : age > 22: 1 (15.7/6)
## employment_length = 1 - 4 yrs:
## :...other_debtors = guarantor: 1 (2.1)
## other_debtors = co-applicant: 2 (0.8)
## other_debtors = none: [S1]
##
## SubTree [S1]
##
## property in {other,building society savings}: 1 (18.4/6.1)
## property in {real estate,unknown/none}: 2 (21.3/4.3)
##
## ----- Trial 6: -----
##
## Decision tree:
##
## checking_balance in {< 0 DM,1 - 200 DM,> 200 DM}:
## :...credit_history = fully repaid: 2 (29.1/11.6)
## : credit_history = fully repaid this bank:
## : :...age <= 23: 1 (3.9)
## : : age > 23:
## : : :...amount <= 409: 1 (3.8)
## : : amount > 409: 2 (39/8.8)
## : credit_history = delayed:
## : :...installment_rate <= 1: 1 (9.2)
## : : installment_rate > 1:
## : : :...savings_balance in {101 - 500 DM,501 - 1000 DM,unknown,
## : : : > 1000 DM}: 1 (16.9/2.7)
## : : savings_balance = < 100 DM:
## : : :...months_loan_duration <= 15: 1 (9.1/1.6)
## : : months_loan_duration > 15: 2 (14.6/1.7)
## : credit_history = critical:
## : :...other_debtors in {guarantor,co-applicant}: 2 (17.2/5.5)
## : : other_debtors = none:
## : : :...savings_balance in {101 - 500 DM,unknown,> 1000 DM}: 1 (21.8/7.4)
## : : savings_balance = 501 - 1000 DM: 2 (9.9/2.7)
## : : savings_balance = < 100 DM:
## : : :...dependents > 1: 1 (13.4/2.4)
## : : dependents <= 1:
## : : :...property in {other,real estate}:
## : : :...amount <= 1169: 1 (3.7)
## : : : amount > 1169: 2 (33.8/7.9)
## : : property in {building society savings,unknown/none}:
## : : :...months_loan_duration > 36: 2 (4.6/0.3)
## : : months_loan_duration <= 36:
## : : :...amount <= 731: 2 (3.3/0.9)
## : : amount > 731:
## : : :...amount <= 7685: 1 (28.4/2.3)
## : : amount > 7685: 2 (2.3)
## : credit_history = repaid:
## : :...other_debtors = guarantor: 1 (16.5/4.2)
## : other_debtors in {none,co-applicant}:
## : :...months_loan_duration <= 11:
## : :...personal_status in {single male,divorced male,
## : : : married male}: 1 (24.8/2.2)
## : : personal_status = female:
## : : :...age <= 48: 2 (19.5/5.3)
## : : age > 48: 1 (5.2)
## : months_loan_duration > 11:
## : :...foreign_worker = no: 1 (3.5)
## : foreign_worker = yes:
## : :...residence_history <= 1:
## : :...job in {unskilled resident,
## : : : unemployed non-resident}: 2 (13.9/2.6)
## : : job in {skilled employee,mangement self-employed}:
## : : :...installment_rate <= 2: 2 (19.9/7)
## : : installment_rate > 2: 1 (32.8/5.5)
## : residence_history > 1:
## : :...employment_length = 0 - 1 yrs: 2 (33.6/4.9)
## : employment_length = unemployed: 1 (10.9/3)
## : employment_length in {> 7 yrs,1 - 4 yrs}:
## : :...personal_status in {single male,female,
## : : : married male}: 2 (140.3/45.8)
## : : personal_status = divorced male: 1 (4.1)
## : employment_length = 4 - 7 yrs:
## : :...other_debtors = co-applicant: 2 (2.3)
## : other_debtors = none:
## : :...installment_rate <= 2: 1 (12.1/1.5)
## : installment_rate > 2:
## : :...dependents <= 1: 2 (16.7/5.3)
## : dependents > 1: 1 (5.4/1.3)
## checking_balance = unknown:
## :...installment_plan = stores: 1 (17.5/6.8)
## installment_plan = bank:
## :...employment_length in {1 - 4 yrs,unemployed}: 2 (23.5/8.8)
## : employment_length in {4 - 7 yrs,0 - 1 yrs}: 1 (10.6/3)
## : employment_length = > 7 yrs:
## : :...age <= 41: 2 (15.3/4.8)
## : age > 41: 1 (6.4)
## installment_plan = none:
## :...purpose in {others,car (used),domestic appliances,
## : retraining}: 1 (22.1)
## purpose in {car (new),radio/tv,furniture,education,business,repairs}:
## :...credit_history in {fully repaid,
## : fully repaid this bank}: 1 (3.4)
## credit_history = critical:
## :...amount <= 6887: 1 (45.4/3.1)
## : amount > 6887: 2 (5/0.3)
## credit_history in {repaid,delayed}:
## :...property = building society savings: 2 (22.7/10.9)
## property = unknown/none: 1 (10.2/2.3)
## property = real estate:
## :...age <= 23: 2 (11.1/2.4)
## : age > 23: 1 (23.3)
## property = other:
## :...job in {unskilled resident,mangement self-employed,
## : unemployed non-resident}: 2 (16.3/4.3)
## job = skilled employee:
## :...residence_history <= 1: 2 (3.9)
## residence_history > 1:
## :...personal_status in {female,
## : divorced male}: 1 (8.5/1.6)
## personal_status in {single male,married male}:
## :...housing = for free: 1 (0)
## housing = rent: 2 (4)
## housing = own:
## :...age <= 31: 2 (17/7.4)
## age > 31: 1 (8.1)
##
## ----- Trial 7: -----
##
## Decision tree:
##
## checking_balance = < 0 DM:
## :...foreign_worker = no: 1 (10/1.9)
## : foreign_worker = yes:
## : :...savings_balance = > 1000 DM: 1 (5.7)
## : savings_balance in {< 100 DM,101 - 500 DM,501 - 1000 DM,unknown}:
## : :...credit_history in {critical,delayed}: 1 (68.5/31.1)
## : credit_history in {fully repaid,
## : : fully repaid this bank}: 2 (36.1/11.2)
## : credit_history = repaid:
## : :...purpose in {education,repairs,domestic appliances,
## : : retraining}: 2 (20/6.1)
## : purpose in {business,others,car (used)}: 1 (24.6/8.4)
## : purpose = car (new):
## : :...savings_balance = 501 - 1000 DM: 2 (0)
## : : savings_balance = 101 - 500 DM: 1 (3)
## : : savings_balance in {< 100 DM,unknown}:
## : : :...other_debtors = guarantor: 1 (1.2)
## : : other_debtors = co-applicant: 2 (3.3)
## : : other_debtors = none:
## : : :...installment_rate <= 2: 1 (9.8/2.9)
## : : installment_rate > 2: 2 (21.6/4)
## : purpose = furniture:
## : :...amount > 4657: 2 (5.5/0.6)
## : : amount <= 4657:
## : : :...amount > 3512: 1 (13/1.9)
## : : amount <= 3512:
## : : :...months_loan_duration <= 15: 1 (12.7/2.6)
## : : months_loan_duration > 15: 2 (18.9/3.9)
## : purpose = radio/tv:
## : :...months_loan_duration > 36: 2 (5.7)
## : months_loan_duration <= 36:
## : :...amount <= 909: 2 (5.9)
## : amount > 909:
## : :...residence_history <= 1: 1 (4.7)
## : residence_history > 1:
## : :...age <= 37: 2 (21.5/8.9)
## : age > 37: 1 (5.6)
## checking_balance in {1 - 200 DM,unknown,> 200 DM}:
## :...purpose in {radio/tv,others,repairs,domestic appliances,
## : retraining}: 1 (201/61)
## purpose = car (used):
## :...amount <= 11054: 1 (45.1/5.1)
## : amount > 11054: 2 (4.3)
## purpose = education:
## :...savings_balance in {501 - 1000 DM,unknown}: 1 (6.9)
## : savings_balance in {< 100 DM,101 - 500 DM,> 1000 DM}:
## : :...employment_length in {> 7 yrs,1 - 4 yrs,0 - 1 yrs,
## : : unemployed}: 2 (29.1/7)
## : employment_length = 4 - 7 yrs: 1 (4.1/0.2)
## purpose = business:
## :...savings_balance in {101 - 500 DM,501 - 1000 DM,unknown,
## : : > 1000 DM}: 1 (30/4.4)
## : savings_balance = < 100 DM:
## : :...other_debtors in {guarantor,co-applicant}: 1 (2.3)
## : other_debtors = none:
## : :...employment_length = 4 - 7 yrs: 1 (5.9)
## : employment_length in {> 7 yrs,1 - 4 yrs,0 - 1 yrs,unemployed}:
## : :...residence_history <= 1: 1 (7.9/2.2)
## : residence_history > 1: 2 (26.9/5.4)
## purpose = car (new):
## :...foreign_worker = no: 1 (5.5)
## : foreign_worker = yes:
## : :...savings_balance = > 1000 DM: 1 (7)
## : savings_balance in {< 100 DM,101 - 500 DM,501 - 1000 DM,unknown}:
## : :...installment_plan = stores: 2 (6.5/2.6)
## : installment_plan = bank:
## : :...job in {unskilled resident,skilled employee,
## : : : unemployed non-resident}: 2 (17.6/1.4)
## : : job = mangement self-employed: 1 (6.6/1.9)
## : installment_plan = none:
## : :...existing_credits > 2: 2 (4.8/0.5)
## : existing_credits <= 2:
## : :...amount <= 12204: 1 (83.5/27.7)
## : amount > 12204: 2 (6.2)
## purpose = furniture:
## :...months_loan_duration > 33: 2 (8.5/1.2)
## months_loan_duration <= 33:
## :...existing_credits > 1: 1 (24.3/4.2)
## existing_credits <= 1:
## :...credit_history in {critical,fully repaid,
## : fully repaid this bank}: 1 (9.6/2)
## credit_history = delayed: 2 (3.7)
## credit_history = repaid:
## :...age <= 23: 1 (10.7)
## age > 23:
## :...dependents > 1: 2 (4.4)
## dependents <= 1:
## :...checking_balance = > 200 DM: 1 (3.6)
## checking_balance in {1 - 200 DM,unknown}:
## :...months_loan_duration <= 18: 2 (28.4/10.2)
## months_loan_duration > 18: 1 (8.1/1.2)
##
## ----- Trial 8: -----
##
## Decision tree:
##
## checking_balance in {< 0 DM,1 - 200 DM}:
## :...savings_balance = 501 - 1000 DM: 2 (20.8/10.4)
## : savings_balance = > 1000 DM: 1 (17.3/4.9)
## : savings_balance = 101 - 500 DM:
## : :...personal_status in {single male,divorced male}: 1 (34.6/13.2)
## : : personal_status in {female,married male}: 2 (22.8/4.2)
## : savings_balance = unknown:
## : :...installment_plan = stores: 2 (1.7)
## : : installment_plan = bank: 1 (16.5/1.1)
## : : installment_plan = none:
## : : :...other_debtors in {guarantor,co-applicant}: 1 (3.4)
## : : other_debtors = none:
## : : :...existing_credits > 1: 1 (8.7/1.6)
## : : existing_credits <= 1:
## : : :...months_loan_duration <= 10: 1 (5.5)
## : : months_loan_duration > 10: 2 (42/16.7)
## : savings_balance = < 100 DM:
## : :...months_loan_duration > 47: 2 (26.9/4)
## : months_loan_duration <= 47:
## : :...purpose in {education,repairs}: 2 (29.8/9.1)
## : purpose in {others,domestic appliances,retraining}: 1 (14.9/4.9)
## : purpose = business:
## : :...months_loan_duration <= 18: 1 (8)
## : : months_loan_duration > 18: 2 (17.3/5.1)
## : purpose = car (used):
## : :...residence_history <= 3: 1 (10/0.5)
## : : residence_history > 3: 2 (16.9/6)
## : purpose = car (new):
## : :...employment_length in {> 7 yrs,0 - 1 yrs,
## : : : unemployed}: 2 (55.8/11.6)
## : : employment_length in {1 - 4 yrs,4 - 7 yrs}:
## : : :...installment_plan = stores: 1 (0)
## : : installment_plan = bank: 2 (7.2/1.3)
## : : installment_plan = none:
## : : :...months_loan_duration <= 22: 1 (27.7/6)
## : : months_loan_duration > 22: 2 (8.4/1.7)
## : purpose = radio/tv:
## : :...months_loan_duration > 36: 2 (5.7)
## : : months_loan_duration <= 36:
## : : :...other_debtors in {guarantor,co-applicant}: 1 (9.5/1.6)
## : : other_debtors = none:
## : : :...employment_length in {> 7 yrs,1 - 4 yrs,
## : : : 4 - 7 yrs}: 1 (43.8/15.6)
## : : employment_length in {0 - 1 yrs,
## : : unemployed}: 2 (21.4/6.8)
## : purpose = furniture:
## : :...other_debtors = guarantor: 1 (4.6)
## : other_debtors in {none,co-applicant}:
## : :...residence_history <= 1: 1 (14.8/2.9)
## : residence_history > 1:
## : :...age <= 36: 1 (51.8/24)
## : age > 36: 2 (26.9/6.3)
## checking_balance in {unknown,> 200 DM}:
## :...employment_length in {0 - 1 yrs,unemployed}:
## :...property in {building society savings,unknown/none}: 1 (21.8/5)
## : property in {other,real estate}:
## : :...other_debtors = co-applicant: 2 (5.5)
## : other_debtors = guarantor: 1 (0.7)
## : other_debtors = none:
## : :...amount > 4746: 2 (12.8)
## : amount <= 4746:
## : :...checking_balance = unknown: 1 (15.1/3.7)
## : checking_balance = > 200 DM: 2 (9.3/1.6)
## employment_length in {> 7 yrs,1 - 4 yrs,4 - 7 yrs}:
## :...months_loan_duration <= 8: 1 (16.3)
## months_loan_duration > 8:
## :...dependents > 1:
## :...checking_balance = > 200 DM: 2 (7.4)
## : checking_balance = unknown:
## : :...savings_balance in {< 100 DM,> 1000 DM}: 2 (19.9/7.3)
## : savings_balance in {101 - 500 DM,501 - 1000 DM,
## : unknown}: 1 (13.7)
## dependents <= 1:
## :...employment_length in {> 7 yrs,4 - 7 yrs}: 1 (87.6/15.1)
## employment_length = 1 - 4 yrs:
## :...residence_history <= 1: 1 (6.4)
## residence_history > 1:
## :...credit_history in {critical,delayed,fully repaid,
## : fully repaid this bank}: 1 (49.7/13.8)
## credit_history = repaid:
## :...installment_plan = stores: 2 (2.4)
## installment_plan in {none,bank}:
## :...amount > 2569: 2 (22.4/6.2)
## amount <= 2569:
## :...job = unskilled resident: 2 (13.6/5.1)
## job in {skilled employee,
## mangement self-employed,
## unemployed non-resident}: 1 (17.7)
##
## ----- Trial 9: -----
##
## Decision tree:
##
## savings_balance in {501 - 1000 DM,unknown,> 1000 DM}: 1 (216.3/63.4)
## savings_balance in {< 100 DM,101 - 500 DM}:
## :...checking_balance in {unknown,> 200 DM}:
## :...other_debtors = guarantor: 1 (2.7)
## : other_debtors = co-applicant: 2 (11.6/4.8)
## : other_debtors = none:
## : :...installment_plan = stores: 2 (13.7/5.2)
## : installment_plan = none:
## : :...credit_history in {repaid,fully repaid}: 1 (79.8/21.1)
## : : credit_history = fully repaid this bank: 2 (1.3)
## : : credit_history = critical:
## : : :...housing in {own,for free}: 1 (26.9)
## : : : housing = rent: 2 (3.6/0.7)
## : : credit_history = delayed:
## : : :...installment_rate <= 3: 1 (11.5/1.7)
## : : installment_rate > 3: 2 (15.4/3.1)
## : installment_plan = bank:
## : :...housing = rent: 2 (5.3/0.8)
## : housing in {own,for free}:
## : :...purpose in {car (new),business}: 2 (10.4/1.5)
## : purpose in {radio/tv,furniture,education,others,repairs,
## : car (used),domestic appliances,
## : retraining}: 1 (18/1.5)
## checking_balance in {< 0 DM,1 - 200 DM}:
## :...months_loan_duration > 47: 2 (34.3/6.9)
## months_loan_duration <= 47:
## :...purpose in {education,others}: 2 (22.3/8.7)
## purpose in {business,repairs,domestic appliances,
## : retraining}: 1 (58.6/22.9)
## purpose = car (used):
## :...amount <= 9283: 1 (27.6/4)
## : amount > 9283: 2 (7.6/1.3)
## purpose = car (new):
## :...other_debtors in {guarantor,co-applicant}: 2 (14.8/1.9)
## : other_debtors = none:
## : :...foreign_worker = no: 1 (3.2)
## : foreign_worker = yes:
## : :...personal_status = divorced male: 2 (4.5/1.7)
## : personal_status = married male: 1 (10.1/3.6)
## : personal_status = female:
## : :...amount <= 5595: 2 (23.3/2.8)
## : : amount > 5595: 1 (5.5)
## : personal_status = single male:
## : :...amount > 7685: 2 (5.6)
## : amount <= 7685:
## : :...installment_rate > 3: 2 (26.8/10.1)
## : installment_rate <= 3: [S1]
## purpose = radio/tv:
## :...foreign_worker = no: 1 (2.8)
## : foreign_worker = yes:
## : :...job = unemployed non-resident: 2 (0)
## : job = mangement self-employed: 1 (16.7/5)
## : job in {unskilled resident,skilled employee}:
## : :...personal_status in {divorced male,
## : : married male}: 2 (15.3/1.6)
## : personal_status in {single male,female}:
## : :...installment_rate <= 1: 1 (3.8)
## : installment_rate > 1:
## : :...dependents > 1: 2 (7.1/1.1)
## : dependents <= 1:
## : :...telephone = yes: 2 (13.2/3.7)
## : telephone = none:
## : :...existing_credits <= 1: 1 (30.9/12.9)
## : existing_credits > 1: 2 (7.4/2.3)
## purpose = furniture:
## :...other_debtors = guarantor: 1 (3.8)
## other_debtors in {none,co-applicant}:
## :...personal_status = married male: 1 (4.4)
## personal_status in {single male,female,divorced male}:
## :...months_loan_duration > 27: 2 (13.7/0.8)
## months_loan_duration <= 27:
## :...dependents > 1: 1 (4.5/0.9)
## dependents <= 1: [S2]
##
## SubTree [S1]
##
## credit_history in {critical,repaid,fully repaid}: 1 (16.8/0.4)
## credit_history in {delayed,fully repaid this bank}: 2 (8.1/2.5)
##
## SubTree [S2]
##
## credit_history in {critical,delayed,fully repaid,
## : fully repaid this bank}: 2 (33.7/12.4)
## credit_history = repaid:
## :...telephone = yes: 2 (8/1.1)
## telephone = none:
## :...amount <= 2522: 2 (21.2/5.9)
## amount > 2522: 1 (17.8/2.2)
##
##
## Evaluation on training data (900 cases):
##
## Trial Decision Tree
## ----- ----------------
## Size Errors
##
## 0 57 127(14.1%)
## 1 42 177(19.7%)
## 2 42 190(21.1%)
## 3 54 176(19.6%)
## 4 43 168(18.7%)
## 5 44 190(21.1%)
## 6 53 202(22.4%)
## 7 48 172(19.1%)
## 8 46 195(21.7%)
## 9 44 187(20.8%)
## boost 30( 3.3%) <<
##
##
## (a) (b) <-classified as
## ---- ----
## 629 3 (a): class 1
## 27 241 (b): class 2
##
##
## Attribute usage:
##
## 100.00% checking_balance
## 100.00% months_loan_duration
## 100.00% purpose
## 100.00% savings_balance
## 100.00% foreign_worker
## 99.11% credit_history
## 92.22% employment_length
## 92.11% installment_plan
## 91.67% other_debtors
## 88.56% amount
## 78.78% personal_status
## 77.44% property
## 74.22% age
## 68.33% dependents
## 66.00% job
## 64.00% residence_history
## 58.44% installment_rate
## 58.00% existing_credits
## 50.22% housing
## 27.44% telephone
##
##
## Time: 0.0 secs
Credit_boost_predict10<-predict(Credit_boost10, Credit_test)
summary(Credit_boost_predict10)
## 1 2
## 79 22
CrossTable(Credit_test$default, Credit_boost_predict10, prop.chisq = FALSE, prop.c = FALSE, prop.r = FALSE, dnn=c('actual default', 'predicted default'))
##
##
## Cell Contents
## |-------------------------|
## | N |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 101
##
##
## | predicted default
## actual default | 1 | 2 | Row Total |
## ---------------|-----------|-----------|-----------|
## 1 | 63 | 5 | 68 |
## | 0.624 | 0.050 | |
## ---------------|-----------|-----------|-----------|
## 2 | 16 | 17 | 33 |
## | 0.158 | 0.168 | |
## ---------------|-----------|-----------|-----------|
## Column Total | 79 | 22 | 101 |
## ---------------|-----------|-----------|-----------|
##
##
You can also embed plots, for example:
Note that the echo = FALSE parameter was added to the
code chunk to prevent printing of the R code that generated the
plot.