subtreeprob
, an operator is chosen from the function set funcset
.
The operands are then generated by recursive calls. If no function of matching range type exists,
a terminal (constant or input variable) will be generated instead. If no subtree is generated, a
constant will be generated with probability constprob
. If no constant is generated, an input
variable will be chosen randomly. The depth of the resulting expression trees can be bounded by the
maxdepth
parameter.
In contrast to randexprGrow
, this function respects sTypes of functions, input variables,
and constant factories. Only well-typed expressions are created.
randexprTypedFull
creates a random full expression tree of depth maxdepth
,
respecting type constraints.
randexprTypedGrow(type, funcset, inset, conset, maxdepth = 8, constprob = 0.2, subtreeprob = 0.5, curdepth = 1)
randexprTypedFull(type, funcset, inset, conset, maxdepth = 8, constprob = 0.2)
0.2
.