Tree Based Models
1
Prerequisites
2
Classification Trees
2.1
Build a classification tree
Exercise
Advantages of tree-based methods
2.2
Prediction with a classification tree
2.3
Train/test split
2.4
Train a classification tree model
2.5
Compute confusion matrix
2.6
Compare models with a different splitting criterion
3
Regression Trees
3.1
Classification vs. regression
3.2
Split the data
3.3
Train a regression tree model
3.4
Evaluate a regression tree model
3.5
Tuning the model
3.6
Generate a grid of hyperparameter values
3.7
Generate a grid of models
4
Bagged Trees
4.1
Advantages of bagged trees
4.2
Train a bagged tree model
4.3
Prediction and confusion matrix
4.4
Predict on a test set and compute AUC
4.5
Cross-validate a bagged tree model in caret
4.6
Generate predictions from the caret model
4.7
Compare test set performance to CV performance
5
Random Forests
5.1
Bagged trees vs. Random Forest
5.2
Train a Rondom Forest model
5.3
Evaluating out-of-bag error
5.4
Evaluating model performance on a test set
5.5
Advantages of OOB error
5.6
Evaluating test set AUC
5.7
Tuning a Random Forest via
mtry
5.8
Tuning a Random Forest via tree depth
6
Boosted Trees
6.1
Bagged trees vs. boosted trees
6.2
Train a GBM model
6.3
Predict using a GBM model
6.4
Evaluate test set AUC
6.5
Early stopping in GBMs
6.6
OOB vs CV-based early stopping
6.7
Compare all models based on AUC
6.8
Plot & compare ROC curves
References
Published with bookdown
Tree Based Models in R
References