soo_function {soobench} | R Documentation |
soo_function
object.Define a new soo_function
object.
soo_function(name, id, fun, dimensions, lower_bounds, upper_bounds, best_value, best_par)
name |
Name of function. |
id |
Short id for the function. Must be unique to the function instance and should not contain any other characters than [a-z0-9] and ‘-’. |
fun |
Function definition. |
dimensions |
Size of parameter space. |
lower_bounds |
Lower bounds of the parameter space. |
upper_bounds |
Upper bounds of the parameter space. |
best_value |
Best known function value. |
best_par |
Parameter settings that correspond to
|
A soo_function
object.
## Given the following simple benchmark function: f_my_sphere <- function(x) sum((x-1)*(x-1)) ## we can define a corresponding 2d soo_function: f <- soo_function("My Sphere", "my-sphere-2d", f_my_sphere, 2, c(-10, -10), c(10, 10), 0, c(1, 1)) ## And then plot it: plot(f)