Lecture 18 Flashcards
Reduced SVD
if A is not square, k = min(n,m) singular values
Cost SVD, LU, matmat
if n=m LU 2/3n^3 matmat n^3 SVD 2n^3 else: O(mn^2 + n^3)
PCA using SVD
X = U@Σ@V.T X* = X@V
SVD rewrite (low rank approximation)
A = Σi=1^n σi@ui@vi.T
ui lin indep. so Σi=1^k σi@ui@vi.T of rank k if no zero singular values (full rank)
||U||_2?
||A||_2?
||U||2 = max{||x||=1} ||Ux|| = max_{||x||=1} √x.T@x = max_{||x||=1} ||x||_2 = 1
||A||2 = max{||x||=1} ||U@Σ@V.T@x|| = max_{||x||=1} ||Σx|| = σ1 = σmax
Condition number and SVD
A square non-singular: cond_2(A) = ||A||.||A^{-1}|| and ||A^{-1}||=1/σmin so cond_2(A) = σmax/σmin
if rank deficient, σmin=0 and cond_2(A) = ∞
Pseudo inverse of a diagonal matrix / of a matrix A
if Σ not invertible, Σ^+ = 1/σi if σi≠0 else 0.
A^+ = V@Σ^+@U.T
Error low rank approximation
||A-~A||2 = ||Σi=k+1^n σi@ui@vi.T|| = σ{k+1}
Relative error approx rank 1 : A=UΣV.T, Σ = .3 0 0 0 0 2.5 0 0 0 0 6 0 0 0 0 1.2
||A-~A1||_2 / ||A||_2
= 2.5/6
A 77x40. How many values to store a rank 9 SVD approx? % saved?
9+77x9+40x9 = 1062 instead of 3080, 65% saved.