How does `svd(A*A')` reduce the computational cost?

5 Ansichten (letzte 30 Tage)
鹏程 张
鹏程 张 am 21 Jun. 2021
Kommentiert: 鹏程 张 am 21 Jun. 2021
Computing singular value decomposition is the main computational cost in many algorithms .
For a matrixA(m*n) ,if m is much larger than n , one can compute the SVD of A*A',and then get an approximate SVD of by simple operations to reduce the computational cost.
How does it reduce the computational cost?
  2 Kommentare
鹏程 张
鹏程 张 am 21 Jun. 2021
Thank you for your answer!
I want to know facing a unbalanced matrix, such as 3*5000, why someone reduce the computational cost by svd(A*A') .
The code is as follows.
function [S, V, D, Sigma2] = MySVD(A)
[m, n] = size(A);
if 2*m < n
AAT = A*A';
[S, Sigma2, D] = svd(AAT);
Sigma2 = diag(Sigma2);
V = sqrt(Sigma2);
tol = max(size(A)) * eps(max(V));
R = sum(V > tol);
V = V(1:R);
S = S(:,1:R);
D = A'*S*diag(1./V);
V = diag(V);
return;
end
if m > 2*n
[S, V, D, Sigma2] = MySVD(A');
mid = D;
D = S;
S = mid;
return;
end
[S,V,D] = svd(A);
Sigma2 = diag(V).^2;

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Cutie
Cutie am 21 Jun. 2021
SVD reduces computational costs because it provides a numerically stable matrix decomposition. You may refer to https://www.youtube.com/playlist?list=PLMrJAkhIeNNSVjnsviglFoY2nXildDCcv for detailed wokrings of SVD
  1 Kommentar
鹏程 张
鹏程 张 am 21 Jun. 2021
Thank you for your answer! Maybe I don't express what I want to know!
what I want to know is when facing a unbalanced matrix, such as 3*5000, why someone reduce the computational cost by svd(A*A') .
The code is as follows.
function [S, V, D, Sigma2] = MySVD(A)
[m, n] = size(A);
if 2*m < n
AAT = A*A';
[S, Sigma2, D] = svd(AAT);
Sigma2 = diag(Sigma2);
V = sqrt(Sigma2);
tol = max(size(A)) * eps(max(V));
R = sum(V > tol);
V = V(1:R);
S = S(:,1:R);
D = A'*S*diag(1./V);
V = diag(V);
return;
end
if m > 2*n
[S, V, D, Sigma2] = MySVD(A');
mid = D;
D = S;
S = mid;
return;
end
[S,V,D] = svd(A);
Sigma2 = diag(V).^2;

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Eigenvalues finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by