Majority vote

This is defined as taking the prediction with the maximum vote while predicting the outcome of a classification problem. First, we need to assign a vote for each model. This step is already done in the decisions_test data frame. A bank will be classified as non-solvent if three of the five models classify it as such. Let's see the results of this approach:

decisions_test$votes<-rowSums(decisions_test[,3:7])
decisions_test$majority_vote<-ifelse(decisions_test$votes>2,1,0)

table(decisions_test$Default,decisions_test$majority_vote)
## 0 1
## 0 2844 52
## 1 8 135

The results seem not to be as good as the individual models or the ensemble that considered the average probabilities:

rm(list=setdiff(ls(), c("Model_database","train","test","summary_models_train","summary_models_test","train_woe","test_woe","decisions_train","decisions_test")))
save.image("~/Data18.RData")
rm(list=ls())
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.89.89