In this section, you are going to learn how to use the rpart package in R to build decision tree models and interpret the results via visualizations with the R rattle package. For those readers that would like to use Python instead of R for this exercise, you can work through the Python examples in the previous section. We will start this section by analyzing the bank marketing dataset in depth, using the dplyr and ggplot2 libraries, and then we will discuss how to build and interpret decision tree models.
For this exercise, we will be using one of the publicly available datasets from the UCI Machine Learning Repository, which can be found at https://archive.ics.uci.edu/ml/datasets/bank+marketing. You can follow the link and download the data in ZIP format. We will use the bank.zip file for this exercise. When you unzip this file, you...