Effacer les filtres
Effacer les filtres

Singular value decomposition method for solving least squares problems

26 vues (au cours des 30 derniers jours)
Jiapeng
Jiapeng le 16 Nov 2022
For Ax=y, how to show in matlab?
In particular, how to show the inverse of the sum of the matrix.

Réponses (2)

Steven Lord
Steven Lord le 16 Nov 2022
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 le 16 Nov 2022
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.

Catégories

En savoir plus sur Linear Algebra dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by