Consider the Mining dataset shown in the following table The


Consider the (Mining dataset shown in the following table The last attribute Cheat is the class attribute. For a three-way -split of these data using attribute Marital Status, compute the information gain using the entropy function fix measuring impurity. Consider that the three-way (multi-way) spin a does by using the three possible values Single. Married, and Divorced of the .Marital Status attribute

Solution

Info(D) = -MI=1pi log2(pi);

Pi= |Ci,D|/|D|

InfoA(D) = v j=1 |Dj|/ |D| *Info(Dj):

Gain(A) = Info(D)-InfoA(D):

Info(D)=- (3/10) log2 (3/10) – (7/10) log2 (7/10)

           =0.522+0.361

           =0.883

Info Marital status (D) = (4/10)* (-(2/4) log2(2/4) - (2/4) log2(2/4)) + (4/10)*(-(0/4) log2(0/2)-(4/4) log2(4/4)                                                                              +(2/10)*(-(1/2) log2(1/2) -(1/2) log2(1/2))

                         = 0.4 + 0 + 0.2

                           = 0.6

Therefore Gain (Marital Status) = 0.883-0.6 = 0.283

 Consider the (Mining dataset shown in the following table The last attribute Cheat is the class attribute. For a three-way -split of these data using attribute

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site