select | R Documentation |
The select function is a function that wraps all parent selection algorithms. It is coded for call purposes from adana main function.
select(selfunc, fitvals, ns, selb, selbc, selc, selk, sells, selns, selps, sels, selt, selt0, selw, selg, selgmax, fmin, reptype, ...)
selfunc |
Name of selection function |
fitvals |
Vector of fitness values belonging to individuals |
ns |
Number of individuals to be selected |
selb |
Exponent coefficent, ( |
selbc |
Base of exponent |
selc |
Scaling parameter |
selk |
Power factor |
sells |
Scaling factor |
selns |
Number of Selection pressure |
selps |
Percentage of Selection, ( |
sels |
Selection pressure, ( |
selt |
Number of tournament size |
selt0 |
Number, Initial temperature |
selw |
Number, Window Size |
selg |
Current generation number |
selgmax |
Maximum generation number |
fmin |
The number to subtract from all fitness values. |
reptype |
Type of Sampling, |
... |
Further arguments passed to or from other methods. |
The indices of randomly selected individuals are returned.
Zeynel Cebeci & Erkut Tekeli
Cebeci, Z. (2021). R ile Genetik Algoritmalar ve Optimizasyon Uygulamalari, 535 p. Ankara:Nobel Akademik Yayincilik.
selrand
,
selrswrp
,
selrws
,
selrws2
,
selrss
,
selsus
,
seldet
,
selwscale
,
selsscale
,
selsscale2
,
sellscale
,
selrscale
,
selrscale2
,
selpscale
,
selescale
,
seltour
,
seltour2
,
selboltour
,
sellrs
,
sellrs2
,
sellrs3
,
selnlrs
,
selers
,
seltrunc
# Create population population = initialize(initfunc=initbin, n=10, m=8) head(population, 5) # Calculate fitness values m = ncol(population)-2 fitvals = evaluate(maxone, population[,1:m]) population[,"fitval"] = fitvals head(population, 5) # Select parents by RWS selidx = select(selfunc=selrws, fitvals=fitvals) matpool = population[selidx,] head(matpool, 5) # Selected chromosomes table(rownames(matpool))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.