DEinterface | R Documentation |
For minimization, this function uses the "DEoptim"
method from the
codeDEoptim package.
DEinterface(x = NULL, fun, lower, upper, control = list(), ...)
x |
optional start point, not used in DEoptim |
fun |
objective function, which receives a matrix x and returns observations y |
lower |
boundary of the search space |
upper |
boundary of the search space |
control |
list of control parameters
|
... |
passed to |
list, with elements
x
archive of the best member at each iteration
y
archive of the best value of fn at each iteration
xbest
best solution
ybest
best observation
count
number of evaluations of fun
objfun <- function (x) matrix(apply(x, 1, function(x) sum(x^2)), , 1)
res <- DEinterface(,lower = c(-10,-20),upper=c(20,8),fun = objfun)
res$ybest
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.