Chapter 11 Tree-Based Methods
Tree-based models such as random forest and gradient boosted trees are frequent winners in data challenges and competitions which use standard numerical and categorical datasets. These methods, in general, provide a good baseline for model performance. This chapter describes the fundamentals of tree-based models and provides a set of standard modeling procedures.
Load R packages:
# install packages from CRAN
<- c('rpart', 'caret', 'partykit',
p_needed 'pROC', 'dplyr', 'ipred',
'e1071', 'randomForest', 'gbm')
<- rownames(installed.packages())
packages <- p_needed[!(p_needed %in% packages)]
p_to_install if (length(p_to_install) > 0) {
install.packages(p_to_install)
}
lapply(p_needed, require, character.only = TRUE)