View source: R/funContinuous.R
makeMoreFunList | R Documentation |
Generate a list of benchmark functions. Based on the More(1981) paper. Contains the first 13 function from the paper. Function numbers are the same as in the paper.
makeMoreFunList(vector2Matrix = TRUE)
vector2Matrix |
logical. Convert vector input to matrix.
Default: TRUE, so it can be used with |
list of functions with starting points and optimum points.
More, J. J., Garbow, B. S., and Hillstrom, K. E. (1981). Testing unconstrained optimization software. ACM Transactions on Mathematical Software (TOMS), 7(1), 17-41. doi: 10.1145/355934.355936
# Generate function list. # Here we use the default setting \code{vector2Matrix = TRUE}, # so the function list can be passed to \code{\link[stats]{optim}}. fl <- makeMoreFunList() optim(par=c(-1.2,1), fn=fl$funList[[1]]) optim(par=fl$startPointList[[1]], fn=fl$funList[[1]])$value optim(par=fl$startPointList[[1]], fn=fl$funList[[1]],NULL, method = "CG", hessian = FALSE)$value optim(fl$startPointList[[1]], fl$funList[[1]],NULL, method = "BFGS", hessian = FALSE)$value optim(fl$startPointList[[1]], fl$funList[[1]],NULL, method = "L-BFGS-B", hessian = FALSE)$value
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.