【问题标题】:Negative value of Information Gain信息增益的负值
【发布时间】:2017-06-27 23:42:27
【问题描述】:

我正在实施 C4.5,并且在我的计算中我得到(对于某些示例)信息增益的负值。我读过Why am I getting a negative information gain,但我的问题似乎有所不同。我将我的计算结果放到了 excel 中,得到的结果与以下相同:

My calculations

我做错了什么?

我尝试再次计算它,并且我得到负值,如下图所示: Newest calculations with data set 80 是拆分值,所以我得到 11 80

【问题讨论】:

  • 您使用的熵公式是什么?
  • 熵公式:-SUM(probability * LOG(BASE 2,probability))

标签: algorithm machine-learning decision-tree entropy information-gain


【解决方案1】:

您是否将熵的结果乘以 -1?

$$ H(X) = -\sum_{i=1}^n {\mathrm{P}(x_i) \log_b \mathrm{P}(x_i)} $$

呃... mathjax 有问题,go here for definition

【讨论】:

  • 是的,我将熵乘以 -1,例如。公式 =-(N3*LOG(N3;2)+O3*LOG(O3;2))
猜你喜欢
  • 1970-01-01
  • 2011-03-18
  • 1970-01-01
  • 2010-12-27
  • 2011-07-24
  • 2015-09-30
  • 2011-06-01
  • 2014-10-17
  • 2021-12-10
相关资源
最近更新 更多