Re: [eigen] Numerical Stability Question |

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] Numerical Stability Question*From*: Mark Borgerding <mark@xxxxxxxxxxxxxx>*Date*: Mon, 29 Jun 2009 18:24:00 -0400

Sounds like you've got some uninitialized memory you're using somewhere. Eric Chu wrote:

Hi Eigen Folks,First off, thanks for a (ridiculously) awesome library. I've managedto solve some robust least-squares problems in less than 2ms. Kudos tothe developers.Second, I've implemented a robust least-squares solver (solves Ax=b byminimizing a Huber loss function) by "translating" some pre-existingMatlab code, but am running into some numerical issues (it's not a bigdeal, since my application can tolerate small mistakes). I'd like toknow if any of you have ideas about what's happening.I'm running a 64-bit, quad core machine, and the following compilerflags (I'm using gcc 4.3.3):-O3 -msse4 -m64 -Wall -DEIGEN_NO_DEBUG In my test code, I've got the following loop for (int i = 0; i < NUM_RUNS; i ++) { lh.linhuber(A, b, x, 1); cout << endl; cout << "Run: " << i+1 << endl; cout << x << endl; }Basically, it uses the same data to solve the least squares problem acouple of times. Running the same "type" of code in Matlab gives thesame answer each time. However, when I run my program, I get thefollowing output (assuming I run 5 times).Run: 1 56.71 -20.04 -3606 Run: 2 56.82 -19.98 -3616 Run: 3 56.69 -20.05 -3604 Run: 4 56.67 -20.05 -3603 Run: 5 56.68 -20.05 -3604The numbers aren't terribly "wrong," but I was wondering why each loopwould give me a slightly different numerical answer. Is there anybehavior in Eigen that *might* give rise to such a phenomenon?Also, I checked the singular values of my matrix A (it's an 800x3matrix). They came out to approx. 3000, 100, 0.5. If there's no otherguess, my thought would be that the solver I've written is playingaround in the "numerical" nullspace there.Any feedback would be appreciated. Once again, great work. Keep it up, Eric.

**Follow-Ups**:**Re: [eigen] Numerical Stability Question***From:*Moritz Lenz

**References**:**[eigen] Numerical Stability Question***From:*Eric Chu

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Numerical Stability Question** - Next by Date:
**Re: [eigen] Numerical Stability Question** - Previous by thread:
**Re: [eigen] Numerical Stability Question** - Next by thread:
**Re: [eigen] Numerical Stability Question**

Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |