Bug 620 - Neglect small singular value in JacobiSVD::solve and add JacobiSVD::rank()
Neglect small singular value in JacobiSVD::solve and add JacobiSVD::rank()
Status: NEW
Product: Eigen
Classification: Unclassified
Component: SVD
3.2
All All
: Normal Unknown
Assigned To: Nobody
:
Depends on:
Blocks: 3.3
  Show dependency treegraph
 
Reported: 2013-06-22 16:48 UTC by Gael Guennebaud
Modified: 2013-06-24 13:12 UTC (History)
0 users



Attachments
Patch for JacobiSVD::solve and Jacobi::rank (5.12 KB, application/octet-stream)
2013-06-22 16:48 UTC, Gael Guennebaud
no flags Details

Description Gael Guennebaud 2013-06-22 16:48:34 UTC
Created attachment 356 [details]
Patch for JacobiSVD::solve and Jacobi::rank

Currently JacobiSVD::solve uses all the non zeros singular-values for solving, i.e., without any thresholding. In practice this led to many numerical issue and large errors for hill conditioned matrices. So far I recommended to use ColPivHouseholderQR but it's time to fix JacobiSVD. Here is a quick patch proposal.

Perhaps we should offert the possibility to tweak the threshold as in ColPivHouseholderQR?

We should also add regression tests.
Comment 1 Gael Guennebaud 2013-06-24 13:12:22 UTC
OK, actually there was a serious issue in Jacobi::solve that explicitly formed the pseudo inverse: this is bad not only regarding the accuracy but also regarding the performance! Fixed and backported:

https://bitbucket.org/eigen/eigen/commits/afff5b36628a/
Changeset:   afff5b36628a
User:        ggael
Date:        2013-06-24 13:08:09
Summary:     Bug 620: fix robustness issue in JacobiSVD::solve (also fix a perf. issue)

https://bitbucket.org/eigen/eigen/commits/f47ab17a54f0/
Changeset:   f47ab17a54f0
Branch:      3.1
User:        ggael
Date:        2013-06-24 13:08:09
Summary:     Bug 620: fix robustness issue in JacobiSVD::solve (also fix a perf. issue)
(transplanted from afff5b36628a642ad0bc1da1efadb7d1c41da3f4)


It would still be interesting to add a setThreshold/threshold /rank API but that's less urgent now.

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