Description Usage Arguments Value
Creates a well-typed R function with a random expression as its body
1 2 3 4 5 6 7 | randfuncTyped(type, funcset, inset, conset, maxdepth = 8, constprob = 0.2,
exprfactory = randexprTypedGrow, breedingFitness = function(individual)
TRUE, breedingTries = 50)
randfuncTypedRampedHalfAndHalf(type, funcset, inset, conset, maxdepth = 8,
constprob = 0.2, breedingFitness = function(individual) TRUE,
breedingTries = 50)
|
type |
The range type of the random function to create. |
funcset |
The function set. |
inset |
The set of input variables. |
conset |
The set of constant factories. |
maxdepth |
The maximum expression tree depth. |
constprob |
The probability of generating a constant in a step of growth, if no subtree
is generated. If neither a subtree nor a constant is generated, a randomly chosen input variable
will be generated. Defaults to |
exprfactory |
The function to use for randomly creating the function's body. |
breedingFitness |
A breeding function. See the documentation for
|
breedingTries |
The number of breeding steps. |
A randomly generated well-typed R function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.