This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 843 - SVD for a certain complex matrix gives wrong singular values / decomposition
Summary: SVD for a certain complex matrix gives wrong singular values / decomposition
Status: RESOLVED FIXED
Alias: None
Product: Eigen
Classification: Unclassified
Component: SVD (show other bugs)
Version: 3.2
Hardware: x86 - general Windows
: Normal Wrong Result
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-16 18:08 UTC by Michael Scherbela
Modified: 2019-12-04 13:31 UTC (History)
3 users (show)



Attachments
Short c++ code that reproduces the error using the matrix loaded from a given .csv file (1.21 KB, application/octet-stream)
2014-07-16 18:08 UTC, Michael Scherbela
no flags Details

Description Michael Scherbela 2014-07-16 18:08:43 UTC
Created attachment 478 [details]
Short c++ code that reproduces the error using the matrix loaded from a given .csv file

Using a 4x4 complex matrix, of which most entries are close to 0, the SVD gives incorrect results.

1.) The singular values differ from python numpy library
2.) Calculating U * diag(S) * V.adjoint() does not give the original A

If the values that are "close to 0" are set exactly to 0, the code works (see attached example)

When the code fails, the biggest returned singular value is the second biggest singular value.

Whishing you all the best!
Comment 1 Gael Guennebaud 2014-07-17 17:16:21 UTC
Thanks for the report.

https://bitbucket.org/eigen/eigen/commits/93c0950aad3b/
Changeset:   93c0950aad3b
User:        ggael
Date:        2014-07-17 17:09:15
Summary:     Bug 843: fix jacobisvd for complexes and extend respective unit test to chack with random tricky matrices

https://bitbucket.org/eigen/eigen/commits/50066353b7ac/
Changeset:   50066353b7ac
Branch:      3.2
User:        ggael
Date:        2014-07-17 17:09:15
Summary:     Bug 843: fix jacobisvd for complexes and extend respective unit test to chack with random tricky matrices,
and backport other JacobiSVD fixes
Comment 2 Nobody 2019-12-04 13:31:18 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/843.

Note You need to log in before you can comment on or make changes to this bug.