我希望是个简单的问题。
如果我有一组这样的数据:
Classification attribute-1 attribute-2
Correct dog dog
Correct dog dog
Wrong dog cat
Correct cat cat
Wrong cat dog
Wrong cat dog
那么attribute-2相对于attribute-1的信息增益是多少呢?
我计算了整个数据集的熵:-(3/6)log2(3/6)-(3/6)log2(3/6)=1
那我就卡住了!我认为您也需要计算属性 1 和属性 2 的熵吗?那么在一次信息增益计算中使用这三个计算呢?
任何帮助都会很棒,
谢谢 :)。