help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] problems with BFGS


From: Sam Mason
Subject: Re: [Help-gsl] problems with BFGS
Date: Sun, 17 Jun 2012 19:42:30 +0100

On 17 June 2012 17:58, Claudio Tablada <address@hidden> wrote:
> Thank you for his response. I attach the program in c for details.

As I suspected; you're not checking your domains...  The optimiser
doesn't know that your functions are only defined for positive values
and is naively passing it negative values.

You need to put a couple of lines into your code when this isn't the
case; i.e. return GSL_NAN from the likelihood function and an
"appropriate error code" for derivatives (NaN also works for me, but
not sure what this is supposed to be and the manual doesn't make it
clear what appropriate is!).

Hope that helps,

  Sam




reply via email to

[Prev in Thread] Current Thread [Next in Thread]