0
4.2kviews
Consider a decision tree for the following set of samples.

Consider a decision tree for the following set of samples. Write any two decision rules obtained from the tree. Classify a new sample with (gender = ‘’Female’’; height = ‘’1.92m’’)

Person ID Gender Height Class
1 Female 1.6m Short
2 Male 2m Tall
3 Female 1.9m Medium
4 Female 2.1m Tall
5 Female 1.7m Short
6 Male 1.85m Medium
7 Female 1.6m Short
8 Male 1.7m Short
9 Male 2.2m Tall
1 Answer
0
91views

P (short) = 4/9

P (medium) = 2/9

P (tall) = 3/9

Dividing the height attribute in to six ranges.

[0, 1.6], [1.6, 1.7], [1.7, 1.8], [1.8, 1.9], [1.9,2.0], [2.0, Infinity]

Gender has only two values Male and Female.

Total Number of short person = 4

Total Number of medium persons = 2

Total Number of tall persons = 3

enter image description here

Consider new sample as Tuple t = {Female, 1.92m}

P (t l Short) = 1/4*0=0

P (t l Medium) = 1/2*0= 0

P (t l Tall) =2/3 *1/3=0.22

Therefore likelihood of being Short = P (t l short) * P (short) = 0* 4/9=0

Similarly,

Likelihood of being Medium = P (t l Medium) * P (Medium) = 0*2/9=0

Likelihood of being Tall = P (t l Tall) * P (Tall) = 1/3 * 3/9=0.11

Then estimate P (t) by adding individual likelihood values since t will be short, medium or tall

P (t) = 0+0+0+0.11=0.11

Finally Actually Probability of each event

P (short l t) = (P (t l short) * P (short)) /P (t) = 0

Similarly,

P (medium l t) = (P (t l medium) * P (medium)) /P (t) = 0

P (Tall l t) = (P (t l Tall) * P (Tall)) /P (t) = 0.33

Result : New Tuple is a Tall as it has the highest Probability.

Please log in to add an answer.