[R] 1 dimensional optimization with local minima

Prof. John C Nash nashjc at uottawa.ca
Tue Nov 3 15:43:51 CET 2009


Most methods for optimization in R seek local minima, though there are
some -- mainly for >1 dimensions, that attempt to find the global
minimum stochastically (optim method SANN, DEoptim). SANN does, I
believe, handle 1 dimension, but does not have a convergence test, but
runs a fixed number of function evaluations (I got bitten by this
unusual behaviour, as it returns a "converged" flag after the specified
number of evaluations).

While there are some techniques that can generate global minima given
conditions on the function, I would anticipate you will do better
graphing your function(s) to learn if they have just a few (++) or very
many (-- = very bad for you) optima. You should apply bounds to your
domain -- a lot of computational time is wasted when routines take a
wild excursion away from a region of interest. That may be enough. Or
you may need to segment the domain to isolate the minima then select the
best. That is, find a local minimum, choose a new interval that does not
include this and apply optimize() again. Messy, but unless you have lots
of local minima, should work OK. If you do have lots, it is likely you
need to re-pose your problem.

JN





> Message: 114
> Date: Mon, 2 Nov 2009 23:00:40 -0800 (PST)
> From: Jeroen Ooms <jeroen.ooms at stat.ucla.edu>
> Subject: [R]  1 dimensional optimization with local minima
> To: r-help at r-project.org
> Message-ID: <26160001.post at talk.nabble.com>
> Content-Type: text/plain; charset=us-ascii
> 
> 
> I am using numerical optimization to fit a 1 parameter model, in which the
> input parameter is bounded. I am currently using optimize(), however, the
> problem turns out to have local minima, and optimize does not always seem to
> find the global minimum. I could to write a wrapping function that tries
> multiple intervals or starting values, but I would prefer a package that has
> built-in methods to make it more robust against local minima.
> 
> I checked the CRAN Task View for Optimization, however there seem to be a
> lot of alternatives, and not being an optimization expert, I could use some
> advice. What could be an appropriate package or function for one-dimensional
> bounded optimization, that includes some protection against local minima? 
> 
> 
> 
> -----
> Jeroen Ooms * Dept. of Methodology and Statistics * Utrecht University 
> 
> Visit  http://www.jeroenooms.com www.jeroenooms.com  to explore some of my
> current projects.
> 
> 
> 
> 
> 
>  
> -- View this message in context: http://old.nabble.com/1-dimensional-optimization-with-local-minima-tp26160001p26160001.html Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list