Description Usage Arguments Details Value References See Also Examples
Main loop of an EDA.
1 | edaRun(eda, f, lower, upper)
|
eda |
|
f |
Objective function. |
lower |
Lower bounds of the variables of the objective function. |
upper |
Upper bounds of the variables of the objective function. |
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 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)
}
|
An EDAResult
instance.
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/.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 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)
|
[1] "edaReport"
[1] "edaTerminate"
Generation Minimum Mean Std. Dev.
1 3.246239e+04 5.884321e+05 2.341322e+05
2 2.835973e+04 3.069995e+05 2.060830e+05
3 1.959912e+03 1.026845e+05 7.294871e+04
4 3.574210e+03 3.642524e+04 2.282394e+04
5 5.101867e+02 1.500370e+04 9.148386e+03
6 1.768218e+02 5.568209e+03 3.487458e+03
7 1.917218e+02 2.052295e+03 1.425284e+03
8 4.578293e+01 7.944429e+02 4.993853e+02
9 2.539575e+01 2.699545e+02 1.760241e+02
10 4.650932e+00 1.030764e+02 7.244186e+01
11 2.075435e+00 3.648176e+01 2.219499e+01
12 1.109917e+00 1.536862e+01 9.467996e+00
13 2.464821e-01 6.301706e+00 3.790714e+00
14 2.151982e-02 2.660646e+00 1.823901e+00
15 4.744013e-02 8.830357e-01 5.710480e-01
16 4.255481e-02 3.910278e-01 2.189472e-01
17 6.669348e-03 1.644925e-01 1.095984e-01
18 5.007632e-03 5.421743e-02 3.581415e-02
19 1.158557e-03 1.888605e-02 1.152616e-02
20 4.389458e-04 7.531478e-03 5.157604e-03
Results for D-vine Estimation of Distribution Algorithm
Best function evaluation 4.389458e-04
No. of generations 20
No. of function evaluations 4000
CPU time 1.163 seconds
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.