Decision trees are one of the simplest (and most popular) of machine learning algorithms, yet they are extremely powerful and used extensively. If you have used a flowchart before, then understanding a decision tree won't be at all difficult for you. A decision tree is a flowchart except in this case, the machine learning algorithm builds this flowchart, for you. Based on the input data, the decision tree algorithm automatically internally creates a knowledge base of a set of rules based on which it can predict an outcome when given a new set of data. In this chapter, we will cover the following topics:
Concepts of a decision tree machine learning classifier, including what a decision tree is, how it is built, and how it can be improved
The uses of the decision tree
A sample case study using decision trees for classification
Let's try to understand the basics of decision trees now.