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*: Eric Chu <eytchu@xxxxxxxxx>*Date*: Mon, 29 Jun 2009 15:40:18 -0700*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=YcN5meoMgzj1G3ZuXRNhDPm0eyXPSYHD+K6lPngm/bo=; b=ANI8pBz5cQcHH1lpfOYjX4pvWuRtqt48Fc8CjQZMXe+j0g+CrpINPJ5LozbdacbwhF GkRBdI4E8Yb2zp76RzAFEmGsstilpB0GFw9dJZ7hC4xv8HN1Hkw7o6Ru/wBb3C2yKeKX JuqsY/nPGgEiDvdsbWTOhtfxOyIIx/S9VhskI=*Domainkey-signature*: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=MBOBfSzOqjt8Gv86svBE8wS8cATL3xmulpoy42ni1gaoCdHkQE1qt//wrXdJ28klZV TepIIXFH+RHqWuTtMw14D7H3t3lGjtOayUqHj88ZGPHKb+uk4gTM7DgrgS0OsPGEwHYR J+JeBgGqQNjBTaqzyjPwsI3ux1wdioQsYk2Gk=

Hi Benoit,

The linhuber() function is basically an iterative solver (uses Newton's method), so it works as follows:

- pick initial starting point (x0)

- compute the gradient and Hessian at x0

- line search to find step length, t

- x := x + t*x0

And iterate.

I used the SVD to compute the initial starting point. The gradient and Hessian are computed using QR factorizations.

I'll dig in my code some more. Mark's suggestion (about uninitialized memory) may be a good place to start looking.

Thanks!

Eric

On Mon, Jun 29, 2009 at 3:21 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:

Hi,

2009/6/30 Eric Chu <eytchu@xxxxxxxxx>:

> Hi Eigen Folks,Thanks :)

>

> First off, thanks for a (ridiculously) awesome library. I've managed to

> solve some robust least-squares problems in less than 2ms. Kudos to the

> developers.

It's hard to say anything without knowing what's inside linhuber(). At

> In my test code, I've got the following loop

>

> for (int i = 0; i < NUM_RUNS; i ++) {

> lh.linhuber(A, b, x, 1);

least, what decomposition(s) is it using ?

Some of our decompositions aren't top quality in 2.0. That's

especially the case of the SVD. We're working on this for 2.1.

I'm not aware of anything involving random numbers in any of our

>

> cout << endl;

> cout << "Run: " << i+1 << endl;

> cout << x << endl;

> }

>

> Basically, it uses the same data to solve the least squares problem a couple

> of times. Running the same "type" of code in Matlab gives the same answer

> each time. However, when I run my program, I get the following 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

> -3604

decompositions algorithms, so I'm as surprised as you are. Again it's

hard to say anything more without looking at linhuber().

Cheers,

Benoit

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

**Re: [eigen] Numerical Stability Question***From:*Benoit Jacob

**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/ |