bobyqa_rosen_x1 | R Documentation |
Minimize Rosenbrock function using bobyqa and expect a normal exit from bobyqa.
bobyqa_rosen_x1()
No return value, called for side effects.
fr <- function(x) { ## Rosenbrock Banana function x1 <- x[1] x2 <- x[2] 100 * (x2 - x1 * x1)^2 + (1 - x1)^2 } (x1 <- minqa::bobyqa(c(1, 2), fr, lower = c(0, 0), upper = c(4, 4))) ## => optimum at c(1, 1) with fval = 0 str(x1) # see that the error code and msg are returned ## corresponding C++ implementation: bobyqa_rosen_x1()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.