Hi all, I've been trying to minimize a likelihood function which I have to evaluate numerically and so there is always a bit of roundoff. I've been testing several of the algorithms in nlopt and so far the BOBYQA algorithm seems to do the best, however I've run into one difficulty that I was wondering if anyone on this list might have dealt with before and so might be able to provide some guidance.
The basic problem I have is that since the likelihood function is evaluated numerically it can often happen that the region over which the BOBYQA algorithm samples becomes too small and so it thinks it has found a local minimum even though the function isn't changing only because there is no difference due to small rounding errors. I have *partially* mitigated this by using a step size which I know is roughly equal to the width of the minimum and repeatedly running the minimization like so: do { *fmin = fval; nlopt_optimize(opt,x,&fval) } while (fval < fmin && (fabs(fval-fmin) > 1e-2)); which will repeatedly run the minimization until the final convergence point is stable. This has the effect of widening the region in which the minimizer samples anytime it gets "stuck" which will often allow it to keep progressing towards the true minimum. The only problem with this approach is that it seems to be very inefficient. It is usually necessary for the fit to run in this loop many times to "kick" the algorithm from some local point where it thinks it has converged which then requires another 2*n evaluations for the next fit to get started (my likelihood function takes a really long time to evaluate, it's on the order of seconds per function call). I was thinking that the fundamental issue seems to be that there is a minimum resolution to the likelihood below which the function calls at various points are not very reliable estimates when trying to approximate the Hessian. I know that the fitter Minuit has an option to set the machine precision size which I've used in the past to tell it that it should disregard differences in the likelihood below some value. Alternatively if I could set something like a minimum step size in each direction to make sure that it didn't try to contract too much that might also work. Has anyone else run into this issue or have any ideas on the best way to solve it? Thanks in advance for any help and for the great software! Tony _______________________________________________ NLopt-discuss mailing list NLopt-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss