Singular value decomposition method for solving least squares problems

조회 수: 25 (최근 30일)
Jiapeng
Jiapeng 2022년 11월 16일
답변: John D'Errico 2022년 11월 16일
For Ax=y, how to show in matlab?
In particular, how to show the inverse of the sum of the matrix.

답변 (2개)

Steven Lord
Steven Lord 2022년 11월 16일
In this case Σ does not represent summation. One of the ways in which the singular value decomposition is represented is:
"Specifically, the singular value decomposition of an complex matrix M is a factorization of the form where U is an complex unitary matrix, is an rectangular diagonal matrix with non-negative real numbers on the diagonal, V is an complex unitary matrix, and is the conjugate transpose of V."

John D'Errico
John D'Errico 2022년 11월 16일
Please stop asking this same question multiple times.
If you are asking how to solve a least squares problem of the form A*x = y, using the svd, then you already have a simple formula right there, based on the output of the SVD, in the form
[U,S,V] = svd(A,0);
Remember that Sigma is a square MATRIX, but that it is also a diagonal matrix, so computing the inverse is easy, as long as none of the singular values are zero, or too close to zero, in which case your matrix was numerically singular anyway. In that case, the pinv solution falls into your lap.
If you are asking how to show that expression does result in a least squares solution, then this is not even a question about MATLAB. Regardless, then you could start with the normal equations solution for least squares. (Usually a bad idea, but it does work here.) Effectively, what is called the OLS method here:
Substitute in the factorization for A=U*S*V' from the SVD, and everything collapses. How to show that is not a question about MATLAB however, but just basic linear algebra.

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by