Description Usage Arguments Value Note See Also Examples
The most flexible way to setup evolutionary algorithms with ecr is by
explicitely generating a task and a control object and passing both to
doTheEvolution
. Although this approach is highly flexible
and very readable it requires quite a lot of code. However, in everyday
life R users frequently need to optimize a single-objective R function.
The ecr
function thus provides a more R like interface for single
objective optimization similar to the interface of the optim
function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ecr(obj.fun, n.dim, lower = NULL, upper = NULL, n.bits, representation,
n.population, n.offspring, n.mating.pool = floor(n.population/2),
survival.strategy = "plus", n.elite = 0L, vectorized.evaluation = FALSE,
custom.constants = list(), logger = NULL,
monitor = setupConsoleMonitor(), max.iter = 100L, max.evals = NULL,
max.time = NULL, more.args = list(), initial.population = NULL,
parent.selector = getDefaultEvolutionaryOperators(representation,
"parent.selector"),
survival.selector = getDefaultEvolutionaryOperators(representation,
"survival.selector"),
generator = getDefaultEvolutionaryOperators(representation, "generator"),
mutator = getDefaultEvolutionaryOperators(representation, "mutator"),
recombinator = getDefaultEvolutionaryOperators(representation,
"recombinator"))
|
obj.fun |
[ |
n.dim |
[ |
lower |
[ |
upper |
[ |
n.bits |
[ |
representation |
[ |
n.population |
[ |
n.offspring |
[ |
n.mating.pool |
[ |
survival.strategy |
[ |
n.elite |
[ |
vectorized.evaluation |
[
Default is |
custom.constants |
[ |
logger |
[ |
monitor |
[ |
max.iter |
[ |
max.evals |
[ |
max.time |
[ |
more.args |
[ |
initial.population |
[ |
parent.selector |
[ |
survival.selector |
[ |
generator |
[ |
mutator |
[ |
recombinator |
[ |
[ecr_result
]
This helper function is applicable for single-objective optimization based
on default encodings, i.e., binary, float and permutation, only.
If your function at hand has multiple objectives or you need special
encodings and operators you need to work with doTheEvolution
directly.
setupECRControl
for building the control object,
makeOptimizationTask
to define an optimization problem and
doTheEvolution
for the main working horse of ecr.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.