A Replacement and Extension of the 'optim' Function

Provides a test of replacement and extension of the optim() function to unify and streamline optimization capabilities in R for smooth, possibly box constrained functions of several or many parameters. This version has a reduced set of methods and is intended to be on CRAN.


News

NEWS about R package optimr and optimrx (formerly optimz in R-forge)

NOTE: optimr is intended for CRAN and has a limited set of solvers to avoid issues of maintenance if those solvers become deprecated or otherwise non-functional. optimrx has a more extensive set of solvers and lives (at 2016-7-11) on R-forge. The test scripts in the tests directory have a "0" at the end of the script name e.g. hobbs15b0.R for optimr because of the appropriate library() call.

TODO o Drop nmkb from methods for bounds if start is on bound o Troubles with NAMESPACE collisions NOT resolved. (nloptr ??) o Add nloptr methods -- there are a number and we need to choose how to do so. Seems unable to handle parameter scaling or dot arguments o Consider how the hyperbolic transformation (transfinite fn) could be used in all unconstrained methods o How can transfinite be made to work when start is on bounds? To work when end is on bounds? o Rcgmin seems to report reset of parameters to bounds when parameter is apparently on the bound. Could have rounding issues, and should avoid this warning if it is really not needed. o Do NOT add ipoptr until non-standard install is fixed up. o Note axsearch() is in the optextras package, but needs a good test. May want to include a maximization test too. o trig1507.R issue of bounds to avoid multiple minima, note ttrig8b lbfgsb3 etc. o grchk() -- can it be cleaned up -- it is in optextras o Put counters in efn, egr ?? o Set up optimrx on R-forge or/and github, and optimr for CRAN with only optim, nlm, nlminb, Rvmmin, Rtnmin, Rcgmin and hjn methods. Consider check to see if other package is loaded e.g., don't want optimr and optimrx to be loaded simulataneously, but possibly R takes care of that.

VERSION 2016-07-10 o hessian=TRUE is NOT properly executed o Test function hobbs15b illustrates different scalings across all methods o Appropriate lists of "ALL", "bounded" and "masked" methods are defined in the ctrldefault() function. o jonesrun L-BFGS-B fails with numerical gradient approximation. o dfoptim hjkb was fixed by Ravi Varadhan

VERSION 2016-07-03 o Move allmeth, bdmeth, maskmeth into ctrldefault so we have just in one place. Note that this will change with optimr/optimrx o Masks for hjn(), and incorporate hjn in optimr o time (xtimes) removed from optimr, but timing is included in opm() o polyalgorithm wrapper polyopt() included and documented with example o multistart wrapper multistart() included and documented with example o renamed coef.optimx to coef.opm

VERSION 2016-06-28 o Checked that controls do not conflict, e.g., maximize and fnscale. Note that maximize is NOT in optim() call. o Checked and fixed scaling of bounds in optimr. However, hjkb seems to fail o Creates scbdtest.R, a test function that is simple but bounded and scaled badly o Get routines from optextras rather than have duplicates in optimr o rename package to optimr for optimR(eplacement) o Problems with lbfgs package (unconstrained) resolved o test parameter scaling (but this could be improved) o Demos still refer to optimx -- must be changed -- 160628 moved off to Roptimtest/current/

VERSION 2016-05-30 o Crude setting of uobyqa and newuoa for control rhobeg. Especially when parameters all 0, or bounds undefined, program will fail so we need to set this. May also be needed for rhoend.

VERSION 2016-01-07 o realized control rhobeg needed to be set or bobyqa would fail.

VERSION 2015-12-20 o first stable version

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("optimr")

2016-8.16 by John C Nash, a year ago


Browse source code at https://github.com/cran/optimr


Authors: John C Nash [aut, cre], Ravi Varadhan [aut], Gabor Grothendieck [ctb]


Documentation:   PDF Manual  


GPL-2 license


Imports optextras, numDeriv, setRNG, Rvmmin, Rcgmin

Suggests knitr, rmarkdown


Suggested by nlsr.


See at CRAN