[R] optim gets stuck
Marcel Wolbers
wolbers at stat.math.ethz.ch
Fri Jul 28 17:44:12 CEST 2000
Dear all
I'm having some trouble with a bound-constrained optimization using
optim(...,method="L-BFGS-B").
Usually, everything works fine, but for some simulations, the algorithm just
gets stuck.
When I let my function (+gradient) evaluation print out the
function value, I see that L-BFGS-B keeps calling the function with
arguments giving the same function value (up to at least the accuracy
required by factr, i.e. 1E-8). So, I don't really understand
why it doesn't stop.
Is this a well-known problem?
The main problem is that the optimization doesn't stop (at least not
in reasonable time) and so the whole simulation gets stuck. Is there a way
to control the time used by "L-BFGS-B" better than with setting maxiter?
(For example setting an upper limit to the number of function and gradient
calls would be nice...)
Sorry, I can't give a reproducable example. The code that produces the
problem is not very handy to attach to the mail (it calls C code...).
Thanks a lot in advance
Marcel Wolbers
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list