Last chance! 50% off unlimited learning
Sale ends in
functionSet(..., list = NULL, parentEnvironmentLevel = 1)
inputVariableSet(..., list = NULL)
constantFactorySet(..., list = NULL)
pw(x, pw)
hasPw(x)
getPw(x, default = 1)
"c"(..., recursive = FALSE)
"c"(..., recursive = FALSE)
"c"(..., recursive = FALSE)
pw
.\$all
contains a list of all
functions, or input variables, or constant factories.
\$byRange
contains a table of all input variables, or
functions, or constant factories, indexed by the string label of
their sTypes for input variables, or by the string label of their
range sTypes for functions, or by the string label of their range
sTypes for constant factories. This field exists mainly for
quickly finding a function, input variable, or constant factory
that matches a given type.Multiple function sets, or multiple input variable sets, or
multiple constant factory sets can be combined using the
c
function. functionSet
creates a function
set. inputVariableSet
creates an input variable set.
constantFactorySet
creates a constant factory set.
Probability weight for functions, input variables, and constants
can be given by tagging constant names, input variables, and
constant factory functions via the pw
function (see
the examples). The predicate hasPw
can be used to check
if an object x
has an associated probability weight.
The function getPw
returns the probability weight
associated with an object x
, if available.
# creating an untyped search space description...
functionSet("+", "-", "*", "/", "exp", "log", "sin", "cos", "tan")
inputVariableSet("x", "y")
constantFactorySet(function() runif(1, -1, 1))
# creating an untyped function set with probability weights...
functionSet(pw("+", 1.2), pw("-", 0.8), pw("*", 1.0), pw("/", 1.0))
Run the code above in your browser using DataLab