Splitting data set using information gain
Show older comments
Answers (1)
Shishir Singhal
on 28 Jul 2020
0 votes
Hi,
I seems like you want to split your data into two sets in the basis of information gain.
Please refer to the file exchange link: https://in.mathworks.com/matlabcentral/fileexchange/14996-entropy
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. !!!
Thanks
Categories
Find more on Spreadsheets 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!