GCD.5 - Random Forest

GCD.5 - Random Forest

  Sample R code for Random Forest

rf50 <- randomForest(Creditability ~., data = Train50, ntree=200, importance=T, proximity=T)
plot(rf50, main="")
Test50_rf_pred <- predict(rf50, Test50, type="class")
table(Test50_rf_pred, Test50$Creditability)
varImpPlot(rf50,  main="", cex=0.8)

Completely unsupervised random forest method on Training data with ntree = 200 leads to the following error plot:

error plot

Importance of predictors are given in the following dotplot.

dotplots of results

which gives rise to the following classification table:

table of results

With judicious choice of more important predictors, further improvement in accuracy is possible. But as improvement is slight, no attempt is made for supervised random forest.

Has Tooltip/Popover
 Toggleable Visibility