Pages

Decision Tree : Example


Decision Tree learning Algorithm:
(i)           Choose an attribute from the dataset
(ii)          Calculate the significance of the attribute in the splitting of the data.
(iii)        Split data based on the value of the best attribute.
(iv)        Go to step (i)

To understand it, Let’s consider a data set of patients given with their ID, age, sex, BP, Cholesterol, and Drug is given to them according to their diseases. The last entry is given only values but the drug is not given. Our task is to find the drug for a patient with ID P15.

Patient ID
Age
Sex
BP
Cholesterol
Drug( A or B)
P1
Young
F
High
Normal
A
P2
Young
F
High
High
A
P3
Middle
F
High
Normal
B
P4
Senior
F
Normal
Normal
B
P5
Senior
M
Low
Normal
B
P6
Senior
M
Low
High
A
P7
Middle
M
 Low
High
B
P8
Young
F
Normal
Normal
A
P9
Young
M
Low
Normal
B
P10
Senior
M
Normal
Normal
B
P11
Young
M
Normal
High
B
P12
Middle
F
Normal
High
B
P13
Middle
M
High
Normal
B
P14
Senior
F
Normal
High
A
P15
Middle
F
Low
Normal
?



Let us make a decision about the tree for the given problem.

Based on this classification, we can say that P15 need Drug B.

No comments:

Post a Comment

If you have any doubt, let me know

Email Subscription

Enter your email address:

Delivered by FeedBurner

INSTAGRAM FEED