Entropy to calculate information gain for decision tree for classification problems.
4 次查看(过去 30 天)
显示 更早的评论
Hi
I wonder whether Matlab has the function to calculate the entropy in order to calcuate the information gain for decision tree classification problems, or do I have to write my own entropy function for this purpose. It seems that the default entropy function in matlab is not for this purpose.
Example below:
Without looking at any predictors, just calculate the entropy purely for the target. There are 9 'yes's and 5 'no's in the target. To calcuate the entropy, use the standard equation below. I wonder whether matlab has a function like this to calcuate the entropy?
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Classification Ensembles 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!