SelectPropFitDiffOnln {xegaSelectGene} | R Documentation |
Selection proportional to fitness differences O(n ln(n)).
Description
SelectPropFitDiffOnln
implements selection
proportional to fitness differences. Negative fitness
vectors are shifted to R^+
.
The default of the function lf$Offset
is 1
.
Holland's schema theorem uses this selection function.
See John Holland (1975) for further information.
Usage
SelectPropFitDiffOnln(fit, lF, size = 1)
Arguments
fit |
Fitness vector. |
lF |
Local configuration. |
size |
Number of selected genes. Default: 1. |
Details
This is a fast implementation which gives exactly the same
results as the functions SelectPropFitDiff
and SelectPropDiffFitM
.
Its runtime is O(n . ln(n))
.
Value
The index vector of the selected genes.
Credits
The code of this function has been adapted by Fabian Aisenbrey.
Warning
There is a potential slow for-loop in the code.
References
Holland, John (1975): Adaptation in Natural and Artificial Systems, The University of Michigan Press, Ann Arbor. (ISBN:0-472-08460-7)
See Also
Other Selection Functions:
SelectDuel()
,
SelectLRSelective()
,
SelectLinearRankTSR()
,
SelectPropFitDiffM()
,
SelectPropFitDiff()
,
SelectPropFitM()
,
SelectPropFitOnln()
,
SelectPropFit()
,
SelectSTournament()
,
SelectSUS()
,
SelectTournament()
,
SelectUniformP()
,
SelectUniform()
Examples
fit<-sample(10, 15, replace=TRUE)
SelectPropFitDiffOnln(fit, NewlFselectGenes())
SelectPropFitOnln(fit, NewlFselectGenes(), length(fit))