9 Splitting data by asking questions: Decision trees

 

In this chapter

  • what is a decision tree
  • using decision trees for classification and regression
  • building an app-recommendation system using users’ information
  • accuracy, Gini index, and entropy, and their role in building decision trees
  • using Scikit-Learn to train a decision tree on a university admissions dataset

In this chapter, we cover decision trees. Decision trees are powerful classification and regression models, which also give us a great deal of information about our dataset. Just like the previous models we’ve learned in this book, decision trees are trained with labeled data, where the labels that we want to predict can be classes (for classification) or values (for regression). For most of this chapter, we focus on decision trees for classification, but near the end of the chapter, we describe decision trees for regression. However, the structure and training process of both types of tree is similar. In this chapter, we develop several use cases, including an app-recommendation system and a model for predicting admissions at a university.

The problem: We need to recommend apps to users according to what they are likely to download

 

The solution: Building an app-recommendation system

 
 
 
 

Beyond questions like yes/no

 
 
 

The graphical boundary of decision trees

 
 

Real-life application: Modeling student admissions with Scikit-Learn

 
 

Decision trees for regression

 
 

Applications

 
 
 

Summary

 
 

Exercises

 
 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage