[R] Fast Two-Dimensional Optimization

Ben Bolker bbolker at gmail.com
Tue Nov 23 02:50:28 CET 2010


Wonsang You <you <at> ifn-magdeburg.de> writes:

> I have attempted "optim" function to solve a two-dimensional optimization
> problem. It took around 25 second to complete the procedure.
> However, I want to reduce the computation time: less than 7 second. Is there
> any optimization function in R which is very rapid?

  This is not nearly enough information for us to help. The answer
depends on the characteristics of your objective function.  You may be
able to quadruple the speed of your optimization by coding your objective
function more efficiently in R or by re-coding it in C or C++. You may
be able to choose better starting conditions.  You may be able to pick
an optimization method that is more suitable for your objective function
(see ?optim and the "optimx" package on r-forge).

  Ben Bolker



More information about the R-help mailing list