1
9.8kviews
Apply Bayesian classification to predict class of new tuple (Nicole, Female, 1.67m) Use the following data.
PERSON ID NAME GENDER HEIGHT CLASS
1 Kristina Female 1.6m Short
2 Jim Male 2m Tall
3 Maggie Female 1.9m Medium
4 Maratha Female 2.1m Tall
5 John Female 1.7m Short
6 Bob Male 1.85m Medium
7 Clinton Female 1.6m Short
8 Nyssa Male 1.7m Short
9 Kathy Male 2.2m Tall

1 Answer
2
1.0kviews

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

Use above values to classify new tuple as Tall.

Consider new Tuple as t = {Jhon, M, 1.95m}

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

P (t l Medium) = ½*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

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

Please log in to add an answer.