设原样本$\mathbf{X}$的协方差矩阵对应的$d'$个特征值组成的投影变换为$\mathbf{W}$. 考虑旋转变换(样本围绕点$\boldsymbol{p}$顺时针旋转$\theta$). 试求解变换后的样本$\hat{\mathbf{X}}$对应的$\hat{\mathbf{W}}$.
时间: 2023-06-19 15:07:42 浏览: 53
设旋转变换矩阵为$\mathbf{R}$,其中:
$$\mathbf{R}=\begin{bmatrix}
\cos \theta & -\sin \theta \\
\sin \theta & \cos \theta
\end{bmatrix}$$
样本点$\mathbf{x}=[x_1,x_2]$绕点$\boldsymbol{p}=[p_1,p_2]$顺时针旋转$\theta$后,变为$\hat{\mathbf{x}}=[\hat{x_1},\hat{x_2}]$,其中:
$$\begin{pmatrix} \hat{x_1} \\ \hat{x_2} \end{pmatrix} = \mathbf{R} \begin{pmatrix} x_1-p_1 \\ x_2-p_2 \end{pmatrix} + \begin{pmatrix} p_1 \\ p_2 \end{pmatrix}$$
将原样本点矩阵$\mathbf{X}$中每个样本点对应的坐标向量$\mathbf{x}$代入上式,得到变换后的样本点矩阵$\hat{\mathbf{X}}$:
$$\hat{\mathbf{X}} = \mathbf{R}(\mathbf{X}-\boldsymbol{p}\boldsymbol{1}^T) + \boldsymbol{p}\boldsymbol{1}^T$$
其中$\boldsymbol{1}$为全1列向量。
我们知道,样本的协方差矩阵可以表示为$\mathbf{X}$的特征向量矩阵$\mathbf{V}$与特征值矩阵$\boldsymbol{\Lambda}$的乘积,即$\mathbf{X}\mathbf{X}^T=\mathbf{V}\boldsymbol{\Lambda}\mathbf{V}^T$。而变换后的样本的协方差矩阵$\hat{\mathbf{X}}\hat{\mathbf{X}}^T$,则可以表示为变换后的样本矩阵$\hat{\mathbf{X}}$的特征向量矩阵$\hat{\mathbf{V}}$与特征值矩阵$\hat{\boldsymbol{\Lambda}}$的乘积,即$\hat{\mathbf{X}}\hat{\mathbf{X}}^T=\hat{\mathbf{V}}\hat{\boldsymbol{\Lambda}}\hat{\mathbf{V}}^T$。
我们要求的是变换后的特征向量矩阵$\hat{\mathbf{V}}$,即:
$$\hat{\mathbf{V}} = [\hat{\mathbf{v_1}}, \hat{\mathbf{v_2}}]$$
其中$\hat{\mathbf{v_1}}$和$\hat{\mathbf{v_2}}$分别是$\hat{\mathbf{X}}\hat{\mathbf{X}}^T$的两个最大特征值对应的特征向量。
将$\hat{\mathbf{X}}\hat{\mathbf{X}}^T$带入上式:
$$\hat{\mathbf{V}} = [\hat{\mathbf{v_1}}, \hat{\mathbf{v_2}}] = \begin{bmatrix} \hat{\mathbf{v_1}} & \hat{\mathbf{v_2}} \end{bmatrix} = \begin{bmatrix} \hat{\mathbf{X}}\hat{\mathbf{X}}^T\hat{\mathbf{v_1}} & \hat{\mathbf{X}}\hat{\mathbf{X}}^T\hat{\mathbf{v_2}} \end{bmatrix} \hat{\boldsymbol{\Lambda}}^{-1/2}$$
其中$\hat{\boldsymbol{\Lambda}}^{-1/2}$为特征值矩阵$\hat{\boldsymbol{\Lambda}}$的逆平方根。
将$\hat{\mathbf{X}}$代入上式,得到变换后的特征向量矩阵$\hat{\mathbf{V}}$:
$$\hat{\mathbf{V}}= \begin{bmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{bmatrix} \begin{bmatrix} \mathbf{V_1} & \mathbf{V_2} \end{bmatrix} \boldsymbol{\Lambda}^{-1/2}$$
其中$\mathbf{V_1}$和$\mathbf{V_2}$分别是协方差矩阵$\mathbf{X}\mathbf{X}^T$的两个最大特征值对应的特征向量。