help-gsl
[Top][All Lists]
Advanced

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

Re: [Help-gsl] Making a multidimensional minimizer throw a GSL_ERROR?


From: Andrew W. Steiner
Subject: Re: [Help-gsl] Making a multidimensional minimizer throw a GSL_ERROR?
Date: Wed, 20 Feb 2008 12:22:51 -0500

A naive solution is to just return an arbitrary large value whenever the
inversion fails (one could imagine more complicated schemes involving
e.g. the determinant). I do this all the time because it happens to work
for my problems. However, the right way to do this is probably to rewrite the
minimizer in such a way as to "choose a different direction" if the
"step in the current direction" fails. In the case of the simplex algorithm
for example, one could just appropriately choose a new simplex and restart.
I'd lean towards rewriting the iterate() function for the minimizer this
way rather than setjmp() hax.

Take care,
Andrew

On Wed, Feb 20, 2008 at 11:27 AM, ddneilson <address@hidden> wrote:
>
>  Hello there,
>   I'm currently working on a smallish little project wherein I'm using
>  GSL's multidimensional minimization routines to find a local minima of a
>  function. The problem is that the evaluations of this function involve
>  finding the inverse of a positive semi-definite matrix via Cholesky
>  decomposition. That in itself isn't a big problem but, some parameter
>  values to the function cause the matrix to become ill-conditioned;
>  resulting in the Cholesky decomp throwing an error.
>
>   What I would like to do in these cases is bail out of the minimizer
>  since the only time this should happen is when the function doesn't have
>  a lower bound (I won't know there isn't a lower bound until I encounter
>  this problem). However, I can't seem to find a way to tell the multimin
>  functions to stop from within a call to the supplied f(), df() or fdf()
>  functions. Is this possible, or am I stuck with some sort of
>  thread-unsafe setjmp/longjmp hack to get out of this?
>
>  Thanks for your time,
>   Daniel
>
>
>  _______________________________________________
>  Help-gsl mailing list
>  address@hidden
>  http://lists.gnu.org/mailman/listinfo/help-gsl
>




reply via email to

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