30- singular value decomposition

I. Background

 Singular value decomposition (Singular value decomposition) referred to as SVD, another method is the matrix into eigenvectors and eigenvalues.

 Singular value decomposition may be a complex matrix with a smaller number of simpler sub-matrix multiplication of said matrix is ​​a submatrix of these important features described.

 It has very important applications in the graphical noise singular value decomposition, the recommendation system.

 For any matrix $ A $ , are singular value decomposition into the following form:

$ A = U \ sum V ^ T $, where $ U, V $ is an orthogonal matrix, $ \ sum $ is a diagonal matrix

 If $ A $ is a positive definite matrix (certainly Symmetry: symmetric matrix ) , then:

$ A = q \ Q to T $

I.e. with an orthogonal matrix Q $ $ $ A $ can make a singular value decomposition, no two

 For an ordinary matrix diagonalization for $ A $:

$A = S\Lambda S^{-1}$

But $ S $ eigenvector matrix in this form is not an orthogonal matrix, and the U-SVD claim $ and $ $ $ V orthogonal matrix are

 

Second, the singular value decomposition of the target

 $ A $ $ m * n $ is the matrix, four substantially orthogonal subspaces can be represented by the following figure, wherein R & lt $ $ rank of the matrix is

 

 The matrix may be $ A $ viewed as a linear transform operation, each of which row vector space $ V $ , is converted into a column vector space $ U $ , i.e. $ $ U = Av .

 Similarly, we can find a line space orthogonal basis , by a matrix $ A $ into another set of orthogonal linear groups of column space:

 Schmidt orthogonalization to give - a set of orthogonal space-yl rows by Gramm - any group can be set by Gramm - into a set of orthonormal basis Schmidt orthogonalization

 但是随便一组正交基(正交基有很多组,如二维中$x,y$轴是一组,$x,y$轴顺时针旋转45度又是一组正交基经过矩阵$A$的线性变换后的向量却未必正交,因此这组满足要求的正交基非常特殊,它们需要满足:

 

 更进一步,在$V$中寻找标准正交向量,经过$A$的线性变换后使$U$中的向量标准化,从而使$U$$V$标准正交

 

 

 

 其中$v_i, u_i$都是单位向量,$\sigma_i$是$u_i$的倍数,称为奇异值

上式就是奇异值分解的目标:寻找行空间的一组标准正交基,通过$A$变成列空间的一组标准正交基

 

 由于$V$中的向量的都是正交向量,因此$VV^T=I$:

$AV=U\sum$

$AVV^T=U\sum V^T$

$A=U\sum V^T$

这正是奇异值分解的形式

 

三、如何分解

 我们已经知道奇异值分解的目标是$A=U\sum V^T$,现在的问题是怎样找到合适的正交矩阵$U$和$V$?

 一下子两个未知数,不好解决,考虑首先解决$U$和$V$中的一个,先将$U$消去:

 

 

 注意到:$A^TA$一个对称方阵,并且符合正定矩阵正交分解的形式

$V$就是$A^TA$的特征向量,$\sigma_i^2$就是$A^TA$的特征值,$\sigma_i$取特征值的正平方根

 

四、正交向量的方向问题

  $A = \left[\begin{array}{ll}{4} & {4} \\ {-3} & {3}\end{array}\right]$,求$A$的奇异值分解

 目标:$A = U\sum V^T$,先求解$V$:

$A^TA = \left[\begin{array}{ll}{4} & {-3} \\ {4} & {3}\end{array}\right]\left[\begin{array}{ll}{4} & {4} \\ {-3} & {3}\end{array}\right]=\left[\begin{array}{ll}{25} & {7} \\ {7} & {25}\end{array}\right]$

 计算特征值和特征向量:

 

 

 将特征向量标准化:

 

 

 现在我们有了下面的式子:

 

 

 通过上式可以进一步求得$U$,但是我们打算用和求$V$同样的方式求得$U$

 好了,现在验证一下奇异值分解的结果:

 这个结果并不等于$A$,问题出在哪呢?

 我们注意到,如果$U$的一个向量反向,$U$中的两个向量仍然是正交向量,且此时可以完成奇异值分解:

 这是因为在奇异值分解的过程中,一旦确认了$V$中向量的方向之后,$U$中向量的方向也一起被限定了

 而在本例中,我们用一种和$V$无关的方式求得了$U$,而这种方法并不一定总是有效,需要尝试改变向量的方向

 

五、奇异矩阵的奇异值分解

 奇异矩阵$A$也可以进行奇异值分解,求矩阵$A = \left[\begin{array}{ll}{4} & {3} \\ {8} & {6}\end{array}\right]$的奇异值分解

 $A$是秩$1$矩阵。容易看出$A$的行空间的基是$v_1 = [4, 3]$,行空间是一维的,与之垂直的向量在零空间上$v_2 = [3, -4]$

 $A$的列空间也是一维的,$u_1 = [1, 2]$,与之垂直的向量在左零空间上,$u_2 = [2, -1]$,将上面的4个向量标准化,得到4个新的向量:

接下来通过$A^TA$的特征向量求得$\sum$

$A^TA = \left[\begin{array}{ll}{4} & {8} \\ {3} & {6}\end{array}\right]\left[\begin{array}{ll}{4} & {3} \\ {8} & {6}\end{array}\right]=\left[\begin{array}{ll}{80} & {60} \\ {60} & {45}\end{array}\right]$

$A^TA$也是一个秩1矩阵,因此可确定一个特征值是0,通过矩阵的迹可确定另一个特征值是125,由此得到了$\sum$:

 

六、致谢

 本文参考,感谢作者分享,知识共享,改变世界!

Guess you like

Origin www.cnblogs.com/always-fight/p/12345326.html