soo_function(soobench)
soo_function()所属R语言包:soobench
Define a new soo_function object.
定义一个新的soo_function对象。
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Define a new soo_function object.
定义一个新的soo_function对象。
用法----------Usage----------
soo_function(name, id, fun, dimensions, lower_bounds,
upper_bounds, best_value, best_par)
参数----------Arguments----------
参数: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 best_value. If there are multiple global minima, this should be a list with one entry for each minimum.
参数设置对应best_value。如果有多个全局极小,这应该是每个最小的一个条目的列表。
值----------Value----------
A soo_function object.
Asoo_function对象。
实例----------Examples----------
## Given the following simple benchmark function:[#以下简单的基准测试功能:]
f_my_sphere <- function(x)
sum((x-1)*(x-1))
## we can define a corresponding 2d soo_function:[#我们可以定义相应的二维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)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|