Computing Information-Gain for Continuous-Valued Attributes in data mining

In this tutorial, we will learn about the computing Information-Gain for Continuous-Valued Attributes

To calculate the split point is not a big deal. It is just a just a fun to find the split point. For example, we have the following data mentioned below;

How can we calculate the split point?

Income Class
18 YES
45 NO
18 NO
25 YES
28 YES
28 NO
34 NO

Solution  to calculate the split point

Step 1:

First of all, we need to sort the data in ascending order. After sorting the data, data is shown in the table below.

Income Class
18 YES
18 NO
25 YES
28 YES
28 NO
34 NO
45 NO

Step 2:

Find the midpoint of first two numbers and calculate the information gain

Split point = (18+25) / 2 = 21

  Infoage<21(D) = 2/7(I(1,1)) + 5/7(I(2,3))

  = 2/7(-1/2(log2(1/2)) – 1/2(log2(1/2))+5/7(-2/5(log2(2/5)) – 3/5(log2(3/5)))

  = 0.98

Fazal Rehman Shamil
Welcome to all friends. The reason for our success is only your love for T4Tutorials. Our team is always available to answer your queries regarding any kind of confusions or discussion regarding your study and career matters. For discussion with us please join our facebook group "T4Tutorials.com". The link of the group is mentioned below. Thanks and love to all for connecting with us. We are nothing without you. Love you all.....
https://web.facebook.com/groups/2066136233601097/

Leave a Reply