The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

optimizr

R-CMD-check Codecov test coverage CRAN status

The optimizr R package currently contains two numerical optimization algorithms. One is a simple implementation of the primitive grid search algorithm, the other is an extension of the simulated annealing algorithm that can take custom boundaries into account. The methodology for this bounded simulated annealing algorithm is due to Haario and Saksman 1991.

Installation

You can install the development version of optimizr from GitHub with:

# install.packages("pak")
pak::pak("LukasDSauer/optimizr")

Example

In the following basic example, we optimize the “wild function” from the stats::optim() examples, global minimum at about -15.81515.

library(optimizr)
# "wild" function from the 
fw <- function (x)
  (10*sin(0.3*x)*sin(1.3*x^2) + 0.00001*x^4 + 0.2*x+80)
simann(par = 50, 
       fn = fw,
       control = list(maxit = 20000, 
                      temp = 10, 
                      parscale = 20, 
                      REPORT = NA_real_))
#> $par
#> [1] -15.8151
#> 
#> $value
#> [1] 67.46775

Reference

Haario H, Saksman E. Simulated Annealing Process in General State Space. Advances in Applied Probability, Vol. 23, No. 4 (Dec., 1991), pp. 866-893, doi:10.2307/1427681.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.