条件熵

参考 https://zh.wikipedia.org/wiki/条件熵

假设有随机变量(X,Y)(X,Y),其联合概率分布为:P(X=xi,Y=yi)=pijP(X=x_i, Y=y_i)=p_{ij}

P(X=xi,Y=yj)=pijP(X=x_i, Y=y_j)=p_{ij},i=1,2,...,n;j=1,2,...,mi=1,2,...,n; j=1,2,...,m

条件熵描述了在已知随机变量XX的值的前提下,随机变量YY 的信息熵还有多少。同其它的信息熵一样,条件熵也用Sh、nat、Hart等信息单位表示。基于XX 条件的YY 的信息熵,用H(Y∣X)H(Y|X)表示。

H(Y∣X=x)H(Y|X=x)为随机变量YY在XX取特定值xx 下的熵,那么H(Y∣X)H(Y|X)就是H(Y∣X=x)H(Y|X=x)在XX取遍所有可能xx后取平均期望的结果。

给定随机变量X∈XX \in \mathcal{X},Y∈YY\in \mathcal{Y},在给定XX条件下YY的条件熵定义为:

H(Y∣X)=∑x∈Xp(x)H(Y∣X=x) H(Y|X)=\displaystyle\sum_{x\in \mathcal{X}}p(x)H(Y|X=x)

=−∑x∈Xp(x)∑y∈Yp(y∣x)logp(y∣x) =-\displaystyle\sum_{x\in \mathcal{X}}p(x)\displaystyle\sum_{y\in \mathcal{Y}}p(y|x)\mathrm{log}p(y|x)

=−∑x∈X∑y∈Yp(x,y)logp(y∣x) =-\displaystyle\sum_{x\in \mathcal{X}}\displaystyle\sum_{y\in \mathcal{Y}}p(x,y)\mathrm{log}p(y|x)

=−∑x∈X,y∈Yp(x,y)logp(x,y)p(x) =-\displaystyle\sum_{x\in \mathcal{X},y\in \mathcal{Y}}p(x,y)\mathrm{log}\dfrac{p(x,y)}{p(x)}

=−∑x∈X,y∈Yp(x,y)logp(x,y)p(x) =-\displaystyle\sum_{x\in \mathcal{X},y\in \mathcal{Y}}p(x,y)\mathrm{log}\dfrac{p(x,y)}{p(x)}

=∑x∈X,y∈Y−p(x,y)logp(x,y)−∑x∈X−p(x)logp(x) =\displaystyle\sum_{x\in \mathcal{X},y\in \mathcal{Y}}-p(x,y)\mathrm{log}p(x,y)-\displaystyle\sum_{x\in \mathcal{X}}-p(x)\mathrm{log}p(x)

=H(X,Y)−H(X) =H(X,Y)-H(X)

即H(Y∣X)=H(X,Y)−H(X)H(Y|X)=H(X,Y)-H(X),同样H(X∣Y)=H(X,Y)−H(Y)H(X|Y)=H(X,Y)-H(Y)

results matching ""

    No results matching ""