可视化信息理论(Visual Information Theory) (下)

本文深入探讨信息论中的熵、交叉熵和多变量熵的概念。熵衡量了使用最佳编码传达事件的平均信息量,而交叉熵则反映了使用针对不同概率分布优化的编码时的平均信息量。文章还介绍了条件熵、互信息以及变量间的信息重叠。同时,讨论了在实际编码中如何处理分数位的信息,以及如何通过一次发送多个消息来提高效率。
摘要由CSDN通过智能技术生成

转载自:https://colah.github.io/posts/2015-09-Visual-Information/



前文概要:
比如一个密文有50%的概率要使用,那么我们可以花50%的密文空间来让这个密文简短一些。如果这个密文只有1%的概率用到,那么只花1%的代价来表示这个密文。

Calculating Entropy

Recall that the cost of a message of length L is 1 2 L \frac{1}{ 2^L} 2L1. We can invert this to get the length of a message that costs a given amount: l o g 2 ( 1 c o s t ) log_2(\frac1{cost}) log2(cost1). Since we spend p(x) on a codeword for x, the length is l o g 2 ( 1 p ( x ) ) log_2(\frac1{p(x)}) log2(p(x)1). Those are the best choices of lengths.

回想一下,长度为L的消息的代价为 1 2 L \frac{1}{ 2^L} 2L1。 我们可以将其求反以获取代价给定数量的消息的长度: l o g 2 ( 1 c o s t ) log_2(\frac1{cost}) log2(cost1)。 由于我们在x的代码字上花费了 p ( x ) p(x) p(x),因此长度为 l o g 2 ( 1 p ( x ) ) log_2(\frac1{p(x)}) log2(p(x)1)。 这是长度的最佳选择。

Earlier, we discussed how there is a fundamental limit to how short one can get the average message to communicate events from a particular probability distribution, p. This limit, the average message length using the best possible code, is called the entropy of p, H§. Now that we know the optimal lengths of the codewords, we can actually calculate it!

之前,我们讨论了从一个特定的概率分布p获得一个平均消息来传达事件的时间有多短的基本限制。 这个限制,即使用最佳可能代码的平均消息长度,称为p的熵H(p)。 既然我们知道了码字的最佳长度,我们就可以实际计算出来了!

H ( p ) = ∑ x p ( x ) l o g 2 ( 1 p ( x ) ) H(p)=∑_xp(x)log_2(\frac1{p(x)}) H(p)=xp(x)log2(p(x)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值