2b Decision Tree 18may
2b Decision Tree 18may
Sudeshna Sarkar
IIT Kharagpur
Definition
• A decision tree is a classifier in the form of a
tree structure with two types of nodes:
– Decision node: Specifies a choice or test of
some attribute, with one branch for each
outcome
– Leaf node: Indicates classification of an example
Decision Tree Example 1
Whether to approve a loan
Employed?
No Yes
Credit
Income?
Score?
High Low High Low
New Examples:
e7 ??? known new short work
e8 ??? unknown new short work
Possible splits
skips 9
length reads 9
No Yes No Yes
Decision Tree for PlayTennis
Outlook
No Yes No Yes
Decision Tree
decision trees represent disjunctions of conjunctions
Outlook
No Yes No Yes
(Outlook=Sunny Humidity=Normal)
(Outlook=Overcast)
(Outlook=Rain Wind=Weak)
Searching for a good tree
• How should you go about building a decision tree?
• The space of decision trees is too big for systematic
search.
• Stop and
– return the a value for the target feature or
– a distribution over target feature values