Further Numerical Optimization Algorithms

A collection of 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), .


optimizr

R-CMD-check Codecov testcoverage CRANstatus

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.

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("optimizr")

1.0.1 by Lukas D Sauer, 7 months ago


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


Authors: Lukas D Sauer [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports stats, progressr, future.apply

Suggests testthat, doFuture


Suggested by baskoptr.


See at CRAN