In this chapter, we will expand your knowledge of explanatory analysis and show you how to use decision trees to understand the drivers behind consumer behavior. We will start by comparing and explaining the differences between logistic regression and decision tree models, and then we will discuss how decision trees are built and trained. Next, we will discuss how a trained decision tree model can be used to extract information about the relationships between the attributes (or features) of individual consumers and the target output variables.
For programming exercises, we will use the bank marketing dataset from the UCI Machine Learning Repository to understand the drivers behind conversions. We will start with some data analysis, so that you can better understand the dataset; then, we will build decision tree models by using the scikit-learn package...