example3_flb_25_dims_box_con | R Documentation |
Minimize a function using L-BFGS-B with 25-dimensional box constrained.
example3_flb_25_dims_box_con()
flb <- function(x) { p <- length(x); sum(c(1, rep(4, p-1)) * (x - c(1, x[-p])^2)^2) } ## 25-dimensional box constrained optim(rep(3, 25), flb, NULL, method = "L-BFGS-B", lower = rep(2, 25), upper = rep(4, 25)) # par[24] is *not* at boundary ## corresponding C++ implementation: example3_flb_25_dims_box_con()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.