Splitting data set using information gain

22 views (last 30 days)
Silpa K
Silpa K on 8 Nov 2019
Answered: Shishir Singhal on 28 Jul 2020
How find maximunm information gain and using this maximum information gain how can I split each row of my data set.
Silpa K
Silpa K on 8 Nov 2019
Or if it possible to do with information entropy for splitting.
ts = xlsread('ArrowHead_TRAIN.xlsx');
for i = 1:36
fa = movstd(p,20,1);
[~,ii] = min(abs(p(:) - k(:)'));
out = p(unique(ii));
Here I have some points in out.I need to find the information entropy based on that I need to spilt each row of my data set and checking each row that contain any of the points in out if any of the number is present I need to add only that splitted series in an excel series.

Sign in to comment.

Answers (1)

Shishir Singhal
Shishir Singhal on 28 Jul 2020
I seems like you want to split your data into two sets in the basis of information gain.
I only need to decide which column of your dataset is represented as a "class" i,e. target variable and which columns are represented as features. Use function "entropyF" to calculate the entropy of each feature variable with respect to "class" variable. Function "getBestEnt" return the index of the feature having highest information gain.
Hope it helps. !!!


Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!