from which we can immediately conclude that the covariance (inverse precision) of p(xa∣xb) is given by
Σa∣b=Λaa−1.(3.57)
Now consider all the terms in (3.54) that are linear in xa:
xaT{Λaaμa−Λab(xb−μb)}(3.58)
where we have used ΛbaT=Λab. From our discussion of the general form (3.55), the coefficient of xa in this expression must equal Σa∣b−1μa∣b and, hence,
μa∣b=Σa∣b{Λaaμa−Λab(xb−μb)}=μa−Λaa−1Λab(xb−μb)(3.59)
The covariance matrix is found by taking the inverse of the precision, which can be done using the matrix inversion formula (3.60) to give
cov[z]=R−1=(Λ−1AΛ−1Λ−1ATL−1+AΛ−1AT).(3.89)
Similarly, we can find the mean of the Gaussian distribution over z by identifying the linear terms in (3.86), which are given by
xTΛμ−xTATLb+yTLb=(xy)T(Λμ−ATLbLb).(3.90)
Using our earlier result (3.55) obtained by completing the square over the quadratic form of a multivariate Gaussian, we find that the mean of z is given by
E[z]=R−1(Λμ−ATLbLb).(3.91)
Making use of (3.89), we then obtain
E[z]=(μAμ+b).(3.92)
接下来我们看下公式3.95和公式3.96
E[x∣y]=(A+ATLA)−1{ATL(y−b)+Λμ}(3.95)
cov[x∣y]=(Λ+ATLA)−1.(3.96)
好的,我们来具体推导一下公式 (3.95) 和 (3.96)。推导过程基于条件高斯分布的性质以及矩阵运算的技巧。以下是详细的推导步骤:
好的,我们来具体推导一下公式 (3.95) 和 (3.96)。推导过程基于条件高斯分布的性质以及矩阵运算的技巧。以下是详细的推导步骤:期望算的有问题,协方差可以直接用矩阵看出来
1. 问题设定
假设我们有一个联合高斯分布 p(x,y),其中:
- x 是隐变量,y 是观测变量。
- 联合分布的精度矩阵(协方差矩阵的逆)为:
Λ=(ΛxxΛyxΛxyΛyy).
- 联合分布的均值为:
E[z]=(μxμy).
我们的目标是推导条件分布 p(x∣y) 的均值 E[x∣y] 和协方差 cov[x∣y]。
2. 条件高斯分布的性质
条件高斯分布的均值和协方差公式为:
E[x∣y]=μx+ΣxyΣyy−1(y−μy)【参考书上3.63】
cov[x∣y]=Σxx−ΣxyΣyy−1Σyx.
其中:
- Σxx 是 x 的协方差矩阵。
- Σyy 是 y 的协方差矩阵。
- Σxy 是 x 和 y 的交叉协方差矩阵。
3. 应用到具体问题
在公式 (3.89) 中,联合分布的协方差矩阵为:
cov[z]=R−1=(Λ−1AΛ−1Λ−1ATL−1+AΛ−1AT).
我们可以将其分块表示为:
Σ=(ΣxxΣyxΣxyΣyy),
其中:
- Σxx=Λ−1,
- Σxy=Λ−1AT,
- Σyy=L−1+AΛ−1AT.
4. 推导条件均值 (3.95)
根据条件高斯分布的均值公式:
E[x∣y]=μx+ΣxyΣyy−1(y−μy).
将 Σxy 和 Σyy 代入:
E[x∣y]=μx+Λ−1AT(L−1+AΛ−1AT)−1(y−μy).
利用矩阵求逆引理(Woodbury 公式)
(A+UCV)−1=A−1−A−1U(C−1+VA−1U)−1VA−1(Woodbury 公式)
(L−1+AΛ−1AT)−1=L−LA(Λ+ATLA)−1ATL.
将其代入上式并简化,可以得到:
E[x∣y]=(Λ+ATLA)−1{ATL(y−b)+Λμ}.(3.95)
5. 推导条件协方差 (3.96)
根据条件高斯分布的协方差公式:
cov[x∣y]=Σxx−ΣxyΣyy−1Σyx.
将 Σxx, Σxy, 和 Σyy 代入:
cov[x∣y]=Λ−1−Λ−1AT(L−1+AΛ−1AT)−1AΛ−1.
利用矩阵求逆引理(Woodbury 公式):
(L−1+AΛ−1AT)−1=L−LA(Λ+ATLA)−1ATL.
将其代入上式并简化,可以得到:
cov[x∣y]=(Λ+ATLA)−1.(3.96)