Singular Value Decomposition (SVD)
CS 663
Ajit Rajwade
1
Singular value Decomposition
2
Diagonal matrix with non-negative entries on the diagonal – called singular values.
Singular value Decomposition
3
Singular value Decomposition
4
Singular value Decomposition
5
This m by n matrix ui vTi is the product of a column vector ui and the transpose of column vector vi. It has rank 1. Thus A is a weighted summation of r rank-1 matrices.
Note: ui and vi are the i-th column of matrix U and V respectively.
Singular value decomposition
6
Application: SVD of Natural Images
7
Singular values of the Mandrill Image: notice the rapid exponential decay of the values! This is characteristic of MOST natural images.
9
Left to right, top to bottom:
Reconstructed image using the first i= 1,2,3,5,10,25,50,100,150 singular values and singular vectors.
Last image: original
10
Left to right, top to bottom, we display:
where i = 1,2,3,5,10,25,50,100,150.
Note each image is independently re-scaled to the 0-1 range for display purpose.
Note: the spatial frequencies increase as the singular values decrease
SVD: Use in Image Compression
11
Properties of SVD: Best low-rank reconstruction
is given using the SVD of A as follows:
12
Note: We are using the singular vectors corresponding to the r largest singular values.
This property of the SVD is called the Eckart Young Theorem.
Properties of SVD: Best low-rank reconstruction
13
Frobenius norm of the matrix (fancy way of saying you square all matrix values, add them up, and then take the square root!)
Why?
Geometric interpretation: Eckart-Young theorem
14
Properties of SVD: Singularity
15
Properties of SVD: Rank, Inverse, Determinant
16
Properties of SVD: Pseudo-inverse
17
Properties of SVD: Frobenius norm
18
Geometric interpretation of the SVD
19
Q
AQ
Geometric interpretation of the SVD
20
Geometric interpretation of the SVD
21
Geometric interpretation of the SVD
22
n x n diagonal matrix - S
m x n matrix (m >> n) with orthonormal columns - U
n x n orthonormal matrix V
Computation of the SVD
23
s = svd(X) returns a vector of singular values.
[U,S,V] = svd(X) produces a diagonal matrix S of the same dimension as X, with nonnegative diagonal elements in decreasing order, and unitary matrices U and V so that X = U*S*V'.
[U,S,V] = svd(X,0) produces the "economy size" decomposition. If X is m-by-n with m > n, then svd computes only the first n columns of U and S is n-by-n.
[U,S,V] = svd(X,'econ') also produces the "economy size" decomposition. If X is m-by-n with m >= n, it is equivalent to svd(X,0). For m < n, only the first m columns of V are computed and S is m-by-m.
s = svds(A,k) computes the k largest singular values and associated singular vectors of matrix A.
SVD Uniqueness
24
SVD Uniqueness
25
Any other applications of SVD?
26
PCA Algorithm using SVD
PCA Algorithm using SVD
4. Instead of finding the eigenvectors of C, we find the left singular vectors of X and its singular values
5. Extract the k eigenvectors in U corresponding to the k largest singular values to form the extracted eigenspace:
There is an implicit assumption here that the first k indices indeed correspond to the k largest eigenvalues. If that is not true, you would need to pick the appropriate indices.
U,S,V are obtained by computing the SVD of X.
References
29