奇異值分解( SVD )的主要應用就是「對特定資料集合做拆解,以便找出相對數量少卻富含重要資訊的要素組成新資料集合,並以此來近似原先的資料集合」,達到以簡馭繁或是減少雜訊的目的( a low-dimensional representation of a high-dimensional matrix )。
Eigenvalues play an important role in situations where the matrix is a transformation from one vector space onto itself."
"Singular values play an important role where the matrix is a transformation from one vector space to a different vector space, possibly with a different dimension."
import numpy as np
import numpy.linalg as la
np.set_printoptions(precision=4, suppress=True)
A= np.array([[1,2,3,4], [1,1,2,3],[0,1,1,0]])
u, s, vt = la.svd(A, full_matrices=True)
import numpy as np
import numpy.linalg as la
np.set_printoptions(precision=4, suppress=True)
A= np.array([[1,2,3,4], [1,1,2,3],[0,1,1,0]])
u, s, vt = la.svd(A, full_matrices=False)