This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen

Bug 620

Summary: Neglect small singular value in JacobiSVD::solve and add JacobiSVD::rank()
Product: Eigen Reporter: Gael Guennebaud <gael.guennebaud>
Component: SVDAssignee: Nobody <eigen.nobody>
Status: RESOLVED FIXED    
Severity: Unknown    
Priority: Normal    
Version: 3.2   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 558    
Attachments:
Description Flags
Patch for JacobiSVD::solve and Jacobi::rank none

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.
Comment 2 Gael Guennebaud 2015-06-08 13:47:42 UTC
All these features are already available.
Comment 3 Nobody 2019-12-04 12:25:43 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/620.