snof | R Documentation |
This is a simplifying wrapper around makeSingleObjectiveFunction
.
It can be used if the function to generte is purely numeric to save some lines
of code.
snof(
name = NULL,
id = NULL,
par.len = NULL,
par.id = "x",
par.lower = NULL,
par.upper = NULL,
description = NULL,
fn,
vectorized = FALSE,
noisy = FALSE,
fn.mean = NULL,
minimize = TRUE,
constraint.fn = NULL,
tags = character(0),
global.opt.params = NULL,
global.opt.value = NULL,
local.opt.params = NULL,
local.opt.values = NULL
)
name |
[ |
id |
[ |
par.len |
[ |
par.id |
[ |
par.lower |
[ |
par.upper |
[ |
description |
[ |
fn |
[ |
vectorized |
[ |
noisy |
[ |
fn.mean |
[ |
minimize |
[ |
constraint.fn |
[ |
tags |
[ |
global.opt.params |
[ |
global.opt.value |
[ |
local.opt.params |
[ |
local.opt.values |
[ |
# first we generate the 10d sphere function the long way
fn = makeSingleObjectiveFunction(
name = "Testfun",
fn = function(x) sum(x^2),
par.set = makeNumericParamSet(
len = 10L, id = "a",
lower = rep(-1.5, 10L), upper = rep(1.5, 10L)
)
)
# ... and now the short way
fn = snof(
name = "Testfun",
fn = function(x) sum(x^2),
par.len = 10L, par.id = "a", par.lower = -1.5, par.upper = 1.5
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.