exacity / deeplearningbook-chinese

Deep Learning Book Chinese Translation
https://exacity.github.io/deeplearningbook-chinese
35.83k stars 9.12k forks source link

关于香农熵公式的困惑(书中公式3.49) #174

Closed zhouguang1972 closed 6 years ago

zhouguang1972 commented 6 years ago

书中的公式3.49表明H(x)=-E[logP(x)],英文原著中也是这样的。 而香农熵(Shannon entropy)的定义在很多网站给出的公式是H(x)=sum(-P(x)logP(x)),我觉得相当于H(x)=-E[P(x)logP(x)],这点我不理解,恳请大牛指点一二。

zhouguang1972 commented 6 years ago

根据书中公式3.9,E(x)=sum(P(x)f(x)),所以H(x)=-E[logP(x)]=sum(-P(x)logP(x))是一致的。我好像明白了。^_^