Decision Trees
Decision Trees
Decision Trees
Important Terminology
overcast contains
only examples of
class ‘Yes’ we can
set it as yes
Next step : find the next node in
our decision tree
• find the node under sunny -- to determine which of the following
Temperature ,Humidity or Wind has higher information gain
E(sunny) = (-(3/5)log(3/5)-(2/5)log(2/5)) =
0.971.
Next Step : find the next node in our
decision tree
• Calculate information gain of Temperature. IG(sunny, Temperature)
Compute IG ,
IG(sunny, Humidity) =
IG(sunny, Wind) =
Next Step : find the next node in our
decision tree
• Calculate information gain of Temperature. IG(sunny, Temperature)
Compute IG ,
IG(sunny, Humidity) = 0.971
IG(sunny, Windy) = 0.020
Next Step : find the next node in our
decision tree
• IG(sunny, Humidity) is the largest value, So Humidity is the node
which comes under sunny.
• https://medium.com/@rakendd/building-decision-trees-and-its-mat
h-711862eea1c0
CART Vs ID3 Vs C4.5
Types of decision trees