Sign correction in SVD and PCA

Determines the right sign of the singular vectors in SVD (score- and loading vectors in PCA)
2.6K Downloads
Updated 16 Nov 2008

View License

Although the Singular Value Decomposition (SVD) and eigenvalue decomposition (EVD) are well-established and can be computed via state-of-the-art algorithms, it is not commonly mentioned that there is an intrinsic sign indeterminacy that can significantly impact the conclusions and interpretations drawn from their results. We provide a solution to the sign ambiguity problem by determining the sign of the singular vector from the sign of the inner product of the singular vector and the individual data vectors. The data vectors may have different orientation but it makes intuitive as well as practical sense to choose the direction in which the majority of the vectors point. This can be found by assessing the sign of the sum of the signed inner products.

More info at: R. Bro, E. Acar, and T. G. Kolda. Resolving the sign ambiguity in the singular value decomposition. J.Chemom. 22:135-140, 2008 and at www.models.life.ku.dk

Cite As

Rasmus Bro (2024). Sign correction in SVD and PCA (https://www.mathworks.com/matlabcentral/fileexchange/22118-sign-correction-in-svd-and-pca), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2008b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Eigenvalues in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0