Learn R Programming

adana (version 1.1.0)

sellrs2: Linear Ranking Selection 2

Description

The Linear Ranking Selection-2 operator selects via probabilities obtained using ordered numbers according to their fitness values. Selection pressure is not applied in this algorithm (Scrucca, 2013).

Usage

sellrs2(fitvals, ns, ...)

Arguments

fitvals

Vector of fitness values belonging to individuals

ns

Number of individuals to be selected

Further arguments passed to or from other methods.

Value

The indices of randomly selected individuals are returned.

References

Scrucca, L. (2013). GA: A package for Genetic Algorithms in R. Journal of Statistical Software, 53(4), 1-37.

See Also

select, selrand, selrswrp, selrws, selrws2, selrss, selsus, seldet, selwscale, selsscale, selsscale2, sellscale, selrscale, selrscale2, selpscale, selescale, seltour, seltour2, selboltour, sellrs

Examples

Run this code
# NOT RUN {
fitvals = c(6.1, 3.5, 6.2, 4.4, 5.2)
cnames = paste0("C",1:length(fitvals))
matpool = sellrs2(fitvals)
cat(cnames[matpool],"\n")
# }

Run the code above in your browser using DataLab