Practical Predictive Analytics
上QQ阅读APP看书,第一时间看更新

Example - comparing single decision trees to a random forest

First, install the titanic package and assign the training dataset to a dataframe:

install.packages("titanic") 
library(titanic)
titanic <- titanic_train[complete.cases(titanic_train), ]