0
4.8kviews
A simple example from the stock market involving only discrete ranges has profit as categorical attribute, with values (Up, Down) and the training data set is given below.apply decision tree algorithm
1 Answer
1
223views

p(Down)=5/2

p(Up)=5/2

types has two values : Software and Hardware

number of profit down=5

number of profit up=5

attribute profit profit probility probility
    Down Up Down Up
Type Softwer 3 3 3/5 3/5
  Hardware 2 2 2/5 2/5
Comptitive Yes 3 1 3/5 1/5
  No 2 4 2/5 4/5
Age New 0 3 0 3/5
  Old 3 0 3/5 0
  Mid 2 2 2/5 2/5

Use above values to classify new tuple as down

Consider new Tuple as t = {softwer,up, yes,old}

p(t|up)=3/51/50=0

p(t|down)=3/53/53/5=27/5=0.216

Therefore likelihood of being up= P (t l up) * P (up) = 0* 5/2=0

Similarly,

Likelihood of being down = P (t l down) * P (down) = 0.216*5/2=0.54

Then estimate P (t) by adding individual likelihood values since t will be up, down

p(t)=0+0.54=0.54

Finally Actually Probability of each event

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

Similarly,

P (down) = (P (t l down) * P (down)) /P (t) = (0.216 * 0.54) /0.54=0.216

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

Please log in to add an answer.