select {adana} | R Documentation |
Select parents for the mating pool
Description
The select function is a function that wraps all parent selection algorithms. It is coded for call purposes from adana main function.
Usage
select(selfunc, fitvals, ns, selb, selbc,
selc, selk, sells, selns, selps, sels, selt,
selt0, selw, selg, selgmax, fmin, reptype, ...)
Arguments
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. |
Value
The indices of randomly selected individuals are returned.
Author(s)
Zeynel Cebeci & Erkut Tekeli
References
Cebeci, Z. (2021). R ile Genetik Algoritmalar ve Optimizasyon Uygulamalari, 535 p. Ankara:Nobel Akademik Yayincilik.
See Also
selrand
,
selrswrp
,
selrws
,
selrws2
,
selrss
,
selsus
,
seldet
,
selwscale
,
selsscale
,
selsscale2
,
sellscale
,
selrscale
,
selrscale2
,
selpscale
,
selescale
,
seltour
,
seltour2
,
selboltour
,
sellrs
,
sellrs2
,
sellrs3
,
selnlrs
,
selers
,
seltrunc
Examples
# 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))