randomFunctionCreation: Creates an R function with a random expression as its body

Description Usage Arguments Value

Description

Creates an R function with a random expression as its body

Usage

1
2
3
4
5
6
7
randfunc(funcset, inset, conset, maxdepth = 8, constprob = 0.2,
  exprfactory = randexprGrow, breedingFitness = function(individual) TRUE,
  breedingTries = 50)

randfuncRampedHalfAndHalf(funcset, inset, conset, maxdepth = 8,
  constprob = 0.2, breedingFitness = function(individual) TRUE,
  breedingTries = 50)

Arguments

funcset

The function set.

inset

The set of input variables.

conset

The set of constant factories.

maxdepth

The maximum expression tree depth.

exprfactory

The function to use for randomly creating the function's body.

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 0.2.

breedingFitness

A breeding function. See the documentation for geneticProgramming for details.

breedingTries

The number of breeding steps.

Value

A randomly generated R function.


rgp documentation built on May 30, 2017, 12:45 a.m.