edaRun {copulaedas} | R Documentation |
Main Loop of an EDA
Description
Main loop of an EDA.
Usage
edaRun(eda, f, lower, upper)
Arguments
eda |
|
f |
Objective function. |
lower |
Lower bounds of the variables of the objective function. |
upper |
Upper bounds of the variables of the objective function. |
Details
EDAs are implemented using S4 classes with generic functions for its main
parts: seeding (edaSeed
), selection (edaSelect
),
learning (edaLearn
), sampling (edaSample
), replacement
(edaReplace
), local optimization (edaOptimize
),
termination (edaTerminate
), and reporting
(edaReport
). The following pseudocode illustrates the interactions
between all the generic functions. It is a simplified version of the
implementation of the edaRun
function.
gen <- 0 fEvals <- 0 terminate <- FALSE while (!terminate) { gen <- gen + 1 if (gen == 1) { model <- NULL pop <- edaSeed(lower, upper) # Set popEval to the evaluation of each solution in pop. # Update fEvals. r <- edaOptimize(gen, pop, popEval, f, lower, upper) pop <- r$pop; popEval <- r$popEval } else { s <- edaSelect(gen, pop, popEval) selectedPop <- pop[s, ]; selectedEval <- popEval[s] model <- edaLearn(gen, model, selectedPop, selectedEval, lower, upper) sampledPop <- edaSample(gen, model, lower, upper) # Set sampledEval to the evaluation of each solution # in sampledPop. Update fEvals. r <- edaOptimize(gen, sampledPop, sampledEval, f, lower, upper) sampledPop <- r$pop; sampledEval <- r$popEval r <- edaReplace(gen, pop, popEval, sampledPop, sampledEval) pop <- r$pop; popEval <- r$popEval } edaReport(gen, fEvals, model, pop, popEval) terminate <- edaTerminate(gen, fEvals, pop, popEval) }
Value
An EDAResult
instance.
References
Gonzalez-Fernandez Y, Soto M (2014). copulaedas: An R Package for Estimation of Distribution Algorithms Based on Copulas. Journal of Statistical Software, 58(9), 1-34. http://www.jstatsoft.org/v58/i09/.
See Also
Examples
setMethod("edaReport", "EDA", edaReportSimple)
setMethod("edaTerminate", "EDA",
edaTerminateCombined(edaTerminateMaxGen,
edaTerminateEval))
DVEDA <- VEDA(vine = "DVine", copulas = c("normal"),
indepTestSigLevel = 0.01, margin = "norm",
popSize = 200, maxGens = 50, fEval = 0,
fEvalTol = 1e-03)
DVEDA@name <- "D-vine Estimation of Distribution Algorithm"
result <- edaRun(DVEDA, fSphere, rep(-600, 5), rep(600, 5))
show(result)