Learn R Programming

adana (version 1.1.0)

seltrunc: Truncation Selection

Description

Individuals in the population are ranked according to their fitness value and individuals with higher fitness value than a determined threshold value are included in the mating pool.

Usage

seltrunc(fitvals, ns, selps, ...)

Arguments

fitvals

Vector of fitness values belonging to individuals

ns

Number of individuals to be selected

selps

Percentage of Selection, (0.0 <= selps <= 1.0)

Further arguments passed to or from other methods.

Value

The indices of randomly selected individuals are returned.

See Also

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

Examples

Run this code
# NOT RUN {
fitvals = c(6, -1, 2, 4, 5) 
cnames = paste0("C",1:length(fitvals)) 
matpool = seltrunc(fitvals, selps=0.60)
cat(cnames[matpool],"\n")  
# }

Run the code above in your browser using DataLab