SVD
with ,
其中,均为正交阵,为对角阵。
"Skinny version": .
性质:
1)SVD 的等价形式 ,
其中和分别为和的列向量。
2)令,,,
定义.
那么
也就是说,矩阵A的最佳rank k近似为.
联系我们在KSVD中用到了矩阵的最佳Rank 1近似。.
结论:假定,那么
所以矩阵A的秩就是A的非零奇异值数。
扰动理论 定理:如果A和A+E都是 with ,对于,将E认为噪声
low rank matrix plus noise example:
- 假定A为低秩矩阵加上噪声,即,
- 当很小时,较大奇异值的数量可以视为矩阵A的秩。(numerial rank)
- 可以通过从奇异值中估计秩k来去除噪声,近似矩阵A通过截断SVD (truncated SVD) .
- ”Correct” rank can be estimated by looking at singular values: when choosing a good k, look for gaps in singular values!
图二中可以注意到在第11个奇异值和第12个奇异值中有一个gap,所以其估计的numerical rank为11。
对于对称矩阵A,其SVD与eigen decomposition 紧密联系,,和分别为特征值和特征向量。
如何计算SVD?
我们是否可以通过计算的特征值来获得奇异值?
这样做是可以,但是这样做非常不好。组成会导致信息的损失。
1、Use Householder transformations to transform A into bidiagonal form(对角形式) B. Now is tridiagonal.(三对角形式)
2、Use QR iteration with Wilkinson shift μ to transform tridiagonal B to diagonal form (without formingimplicitly!)
- Can be computed in flops.
- Efficiently implemented everywhere.
Sparse Matrices
- 在许多应用中,矩阵中只有一些项是非零项(比如term-document matrices)
- 迭代方法常用于求解稀疏问题
- Transformation to tridiagonal form would destroy sparsity, which leads to excessive storage requirements,同时计算复杂度也会过高(prohibitively high)当数据矩阵的维度很大时。
Rank-1 approximation
SVD分解后,通过matlab验证我们发现可以用分解后得到U、E、V的第一个值或者列向量来近似原来的矩阵。这个也就是所谓的Rank-1 Approximation。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
>> a=[2 1 3;4 3 5] a = 2 1 3 4 3 5 >> [U E V]=svd(a) U = -0.4641 -0.8858 -0.8858 0.4641 E = 7.9764 0 0 0 0.6142 0 V = -0.5606 0.1382 -0.8165 -0.3913 0.8247 0.4082 -0.7298 -0.5484 0.4082 >> U(:,1)*E(1,1)*V(:,1)' ans = 2.0752 1.4487 2.7017 3.9606 2.7649 5.1563 |
如果A是一个 m x n 的矩阵,而B是一个 p x q 的矩阵,克罗内克积则是一个 mp x nq 的矩阵,表示为如图所示:
the kronecker product of a row vector and a column vector is essentially their outer product。
1 2 3 4 5 6 |
>> (kron(U(:,1)',V(:,1))*E(1,1))' ans = 2.0752 1.4487 2.7017 3.9606 2.7649 5.1563 |