A decision tree is a simple diagram used to make decisions or predictions. It has three main types of nodes:
Here is an example of a decision tree used to classify whether an animal is a mammal or not:
Figure: Decision tree example showing classification of mammals and non-mammals.
Four functions are used in this algorithm: