[Top][All Lists]

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

Re: [Help-gsl] BFGS optmizer, how to use ?

From: Brian Gough
Subject: Re: [Help-gsl] BFGS optmizer, how to use ?
Date: Wed, 2 Jun 2004 16:37:29 +0100

Alex Brussee writes:
 > I am trying to use the bfgs minimizer to optimize A3, A2, A1, A0 in
 > the next formula: f(x) = A3*x*x*x + A2*x*x + A1*x + A0. In my
 > program, the objective is not to optimize the function directly,
 > but by comparing results from the current vector of function
 > parameters (A3, A2, A1, A0) for a number of X-values to a set of
 > precalculated values made with a target vector of function
 > parameters (10,20,15,25 in my case). The BFGS alg. seems to be
 > converging, but after a number steps it gives NaN's. I do not know
 > what i am doing wrong, does anybody see what is missing from my
 > code ?

My suggestion is to find the iteration where the Nan's first occur and
step through it using GDB to see what is going wrong.

You might also try using the gsl_ieee_env_setup function to catch any
division by zero (see the GSL manual for details).

Brian Gough

Network Theory Ltd,
Publishing Free Software Manuals ---

reply via email to

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