Fast SVD and PCA

버전 1.3.0.0 (3.35 KB) 작성자: Vipin Vijayan
Fast truncated SVD and PCA rectangular matrices
다운로드 수: 3.8K
업데이트 날짜: 2014/7/7

라이선스 보기

Truncated Singular Value Decomposition (SVD) and Principal Component Analysis (PCA) that are much faster compared to using the Matlab svd and svds functions for rectangular matrices.
svdecon is a faster alternative to svd(X,'econ') for long or thin matrices.
svdsecon is a faster alternative to svds(X,k) for dense long or thin matrices where k << size(X,1) and size(X,2).
PCA versions of the two svd functions are also implemented.
---

function [U,S,V] = svdecon(X)
function [U,S,V] = svdecon(X,k)

Input:
X : m x n matrix
k : gets the first k singular values (if k not given then k = min(m,n))

Output:
X = U*S*V'
U : m x k
S : k x k
V : n x k

Description:
svdecon(X) is equivalent to svd(X,'econ')
svdecon(X,k) is equivalent to svds(X,k) where k < min(m,n)
This is faster than svdsecon when k is not much smaller than min(m,n)

---

function [U,S,V] = svdsecon(X,k)

Input:
X : m x n matrix
k : gets the first k singular values, k << min(m,n)

Output:
X = U*S*V' approximately (up to k)
U : m x k
S : k x k
V : n x k

Description:
svdsecon(X,k) is equivalent to svds(X,k) where k < min(m,n)
This function is useful if k << min(m,n) (see doc eigs)

---

function [U,T,mu] = pcaecon(X,k)

Input:
X : m x n matrix
Each column of X is a feature vector
k : extracts the first k principal components

Output:
X = U*T approximately (up to k)
T = U'*X
U : m x k
T : k x n

Description:
Principal Component Analysis (PCA)
Requires that k < min(m,n)

---

function [U,T,mu] = pcasecon(X,k)

Input:
X : m x n matrix
Each column of X is a feature vector
k : extracts the first k principal components, k << min(m,n)

Output:
X = U*T approximately (up to k)
T = U'*X
U : m x k
T : k x n

Description:
Principal Component Analysis (PCA)
Requires that k < min(m,n)
This function is useful if k << min(m,n) (see doc eigs)

인용 양식

Vipin Vijayan (2026). Fast SVD and PCA (https://kr.mathworks.com/matlabcentral/fileexchange/47132-fast-svd-and-pca), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2013a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기
도움

도움 준 파일: EOF

버전 게시됨 릴리스 정보
1.3.0.0

Uses less memory now

1.2.0.0

Truncated

1.1.0.0

Title change

1.0.0.0