式子(16.3)和(16.4)的推导

由式子(16.2)和Σ=cov⁡(x,x)=E[(x−μ)(x−μ)T]\Sigma=\operatorname{cov}(\boldsymbol{x}, \boldsymbol{x})=E\left[(\boldsymbol{x}-\boldsymbol{\mu})(\boldsymbol{x}-\boldsymbol{\mu})^{\mathrm{T}}\right]Σ=cov(x,x)=E[(xμ)(xμ)T]
var⁡(yi)=E[(yi−E(yi))(yi−E(yi))T]=E[(αiTx−αiTμ)(αiTx−αiTμ)T]=E[(αiT(x−μ))(αiT(x−μ))T]=E[αiT(x−μ)(x−μ)Tαi]=αiTE[(x−μ)(x−μ)T]αi=αiTΣαi \begin{aligned} \operatorname{var}\left(y_{i}\right) &=E\left[\left(y_{i}-E\left(y_{i}\right)\right)\left(y_{i}-E\left(y_{i}\right)\right)^{T}\right] \\ &=E\left[\left(\alpha_{i}^{T} x-\alpha_{i}^{T} \mu\right)\left(\alpha_{i}^{T} x-\alpha_{i}^{T} \mu\right)^{T}\right] \\ &=E\left[\left(\alpha_{i}^{T}(x-\mu)\right)\left(\alpha_{i}^{T}(x-\mu)\right)^{T}\right] \\ &=E\left[\alpha_{i}^{T}(x-\mu)(x-\mu)^{T} \alpha_{i}\right] \\ &=\alpha_{i}^{T} E\left[(x-\mu)(x-\mu)^{T}\right] \alpha_{i} \\ &=\alpha_{i}^{T} \Sigma \alpha_{i} \end{aligned} var(yi)=E[(yiE(yi))(yiE(yi))T]=E[(αiTxαiTμ)(αiTxαiTμ)T]=E[(αiT(xμ))(αiT(xμ))T]=E[αiT(xμ)(xμ)Tαi]=αiTE[(xμ)(xμ)T]αi=αiTΣαi
式子(16.3)得证,同理可以证明式子(16.4)
cov⁡(yi,yj)=E[(yi−E(yi))(yj−E(yj))T]=E[(αiTx−αiTμ)(αjTx−αjTμ)T]=E[(αiT(x−μ))(αjT(x−μ))T]=E[αiT(x−μ)(x−μ)Tαj]=αiTE[(x−μ)(x−μ)T]αj=αiTΣαj \begin{aligned} \operatorname{cov}(y_{i},y_{j}) &=E\left[\left(y_{i}-E\left(y_{i}\right)\right)\left(y_{j}-E\left(y_{j}\right)\right)^{T}\right] \\ &=E\left[\left(\alpha_{i}^{T} x-\alpha_{i}^{T} \mu\right)\left(\alpha_{j}^{T} x-\alpha_{j}^{T} \mu\right)^{T}\right] \\ &=E\left[\left(\alpha_{i}^{T}(x-\mu)\right)\left(\alpha_{j}^{T}(x-\mu)\right)^{T}\right] \\ &=E\left[\alpha_{i}^{T}(x-\mu)(x-\mu)^{T} \alpha_{j}\right] \\ &=\alpha_{i}^{T} E\left[(x-\mu)(x-\mu)^{T}\right] \alpha_{j} \\ &=\alpha_{i}^{T} \Sigma \alpha_{j} \end{aligned} cov(yi,yj)=E[(yiE(yi))(yjE(yj))T]=E[(αiTxαiTμ)(αjTxαjTμ)T]=E[(αiT(xμ))(αjT(xμ))T]=E[αiT(xμ)(xμ)Tαj]=αiTE[(xμ)(xμ)T]αj=αiTΣαj
式子(16.7)最优化问题推导补充

首先要知道矩阵求导的几个简单法则:
∂(xTa)∂x=∂(aTx)∂x=a∂(xTx)∂x=2x∂(xTAx)∂x=Ax+ATx \frac{\partial\left(\boldsymbol{x}^{T} \boldsymbol{a}\right)}{\partial \boldsymbol{x}}=\frac{\partial\left(\boldsymbol{a}^{T} \boldsymbol{x}\right)}{\partial \boldsymbol{x}}=\boldsymbol{a}\\ \frac{\partial\left(\boldsymbol{x^{T}} \boldsymbol{x}\right)}{\partial \boldsymbol{x}}=2 \boldsymbol{x}\\ \frac{\partial\left(\boldsymbol{x}^{T} \boldsymbol{A} \boldsymbol{x}\right)}{\partial \boldsymbol{x}}=\boldsymbol{A} \boldsymbol{x}+\mathbf{A}^{T} \boldsymbol{x} x(xTa)=x(aTx)=ax(xTx)=2xx(xTAx)=Ax+ATx
所以拉格朗日函数求导并令其得0为:
原式=∂α1TΣα1∂α1−λ∂α1α∂α1=Σα1+ΣTα1−2λα1=2Σα1−2λα1=0 \begin{aligned} 原式&=\frac{\partial{\alpha_1^T\Sigma\alpha_1}}{\partial{\alpha_1}}-\frac{\lambda\partial{\alpha_1\alpha}}{\partial{\alpha_1}}\\ &=\Sigma\alpha_1+\Sigma^T\alpha_1-2\lambda\alpha_1\\ &=2\Sigma\alpha_1-2\lambda\alpha_1\\ &=0 \end{aligned} =α1α1TΣα1α1λα1α=Σα1+ΣTα12λα1=2Σα12λα1=0

【例16.1】一些计算的补充

首先求相关矩阵R的特征值和特征向量,这边就直接使用python来求解,毕竟所给的数据不太好手动求

import numpy as np

mat = np.array([[1, 0.44, 0.29, 0.33],
                [0.44, 1, 0.35, 0.32],
                [0.29, 0.35, 1, 0.60],
                [0.33, 0.32, 0.60, 1]])

eigenvalue, featurevector = np.linalg.eig(mat)

print("特征值:", np.around(eigenvalue, decimals=2))
print("特征向量:", np.around(featurevector, decimals=3))

image-20220503121352209

可以看到,特征值和书上一样的,但是特征向量不一样,不过这没影响,毕竟特征向量本来就不唯一。

y1的方差贡献率为λ1∑i=1λi=2.174=0.543y_1的方差贡献率为\frac{\lambda_1}{\sum_{i=1}\lambda_i}=\frac{2.17}{4}=0.543y1i=1λiλ1=42.17=0.543,同理y2的方差贡献率为λ2∑i=2λi=0.874=0.218y_2的方差贡献率为\frac{\lambda_2}{\sum_{i=2}\lambda_i}=\frac{0.87}{4}=0.218y2i=2λiλ2=40.87=0.218

因子负荷量的计算公式为:ρ(yk,xi)=λkeik\rho(y_k,x_i)=\sqrt{\lambda_k}e_{ik}ρ(yk,xi)=λk eik

IMG_0429 image-20220503123159268 IMG_0430
Logo

DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。

更多推荐