selwscale | R Documentation |
Window Scaling is a method based on subtracting the worst fitness value from the other fitness values. In this case, since the scaled values of the worst fit individuals will be 0, these individuals will not be given a chance to be selected.
selwscale(fitvals, ns, fmin, ...)
fitvals |
Vector of fitness values belonging to individuals |
ns |
Number of individuals to be selected |
fmin |
The number to subtract from all fitness values. |
... |
Further arguments passed to or from other methods. |
The indices of randomly selected individuals are returned.
Zeynel Cebeci & Erkut Tekeli
select
,
selrand
,
selrswrp
,
selrws
,
selrws2
,
selsus
,
seldet
,
selrss
,
selsscale
,
selsscale2
,
sellscale
,
selrscale
,
selrscale2
,
selpscale
,
selescale
,
seltour
,
seltour2
fitvals = c(6.1, 3.5, 6.2, 4.4, 5.2) fmin = min(fitvals) cnames = paste0("C",1:length(fitvals)) matpool = selwscale(fitvals, fmin=fmin) cat(cnames[matpool],"\n") fitvals = fitvals[matpool] fitvals matpool = selwscale(fitvals, fmin=fmin) cat(cnames[matpool],"\n") fitvals = fitvals[matpool] fitvals fmin = min(fitvals) matpool = selwscale(fitvals, fmin=fmin) cat(cnames[matpool],"\n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.