This algorithm is used to predict an output based on the available labeled data having varying parameters. To deal with the problem, it builds a tree-like structure that has nodes to distinguish different characteristics within data.
Let's take an example of a boy named Smith. We have collected data related to Smith's outdoor activities that can tell us which weather condition is most likely to provoke Smith into going out to play with his friends. The following is the data collected over a period of 10 days:
Weather |
Wind |
Humidity |
Played |
Cloudy |
Normal |
Normal |
Yes |
Sunny |
Weak |
High |
No |
Sunny |
Normal |
Normal |
Yes |
Cloudy |
Normal |
Normal |
Yes |
Rainy |
Normal |
Normal |
Yes |
Sunny |
Normal |
High |
No |
Rainy |
Normal |
High |
Yes |
Rainy |
Strong |
Normal |
No |
Cloudy |
Strong |
Normal |
... |