I have a decision tree built in R using rpart() from rpart package. However, when following the nodes, we have one condition leading to both outcomes as GOOD. This is weird for me.
What does that mean? If the customer have AccB < 3.5, then he/she is a good customer. If not, he/she is also a good customer? Shouldn't the condition lead to two opposite outcomes?
This link contains the German Credit data used to plot this tree (Credibility is the dependent variable).
This is the code used: ## split train and test dataset train_index = sample(1:nrow(dados), 0.6*nrow(dados), replace = FALSE);
train = data.frame(); train = dados[train_index,]; test = data.frame(); test = dados[-train_index,]; ## Use rpart to run decision tree train_tree = rpart(Creditability~., data = train); ## plot decision tree rpart.plot(train_tree, type = 2, yesno=F, fallen.leaves = F, extra = 102, under = T, cex=NULL, uniform=T, varlen=4, gap=0, space=0, tweak=1.2);
This is the tree generated: