SelectGeneFactory {xegaSelectGene} | R Documentation |
Configure the selection function of a genetic algorithm.
Description
SelectGeneFactory
implements selection
of one of the gene selection functions in this
package by specifying a text string.
The selection fails ungracefully (produces
a runtime error), if the label does not match.
The functions are specified locally.
Current support:
"Uniform" returns
SelectUniform
."UniformP" returns
SelectUniformP
."ProportionalOnln" returns
SelectPropFitOnln
."Proportional" returns
SelectPropFit
."ProportionalM" returns
SelectPropFitM
."PropFitDiffOnln" returns
SelectPropFitDiffOnln
."PropFitDiff" returns
SelectPropFitDiff
."PropFitDiffM" returns
SelectPropFitDiffM
."Tournament" returns
SelectTournament
."STournament" returns
SelectSTournament
."Duel" returns
SelectDuel
."LRSelective" returns
SelectLRSelective
."LRTSR" returns
SelectLinearRankTSR
."SUS" returns a function factory for
SelectSUS
.
Usage
SelectGeneFactory(method = "PropFitDiffOnln")
Arguments
method |
A string specifying the selection function. |
Details
If SelectionContinuation()==TRUE
then:
In package xegaPopulation function
NextPopulation
, first the functionsSelectGene
andSelectMate
are transformed byTransformSelect
to a continuation function with embedded index vector and counter.For each call in
ReplicateGene
,SelectGene
andSelectMate
return the index of the selected gene.
Value
A selection function for genes.
See Also
Other Configuration:
DispersionMeasureFactory()
,
EvalGeneFactory()
,
ScalingFactory()
Examples
SelectGene<-SelectGeneFactory("Uniform")
fit<-sample(10, 15, replace=TRUE)
SelectGene(fit, lFselectGenes)
sel<-"Proportional"
SelectGene<-SelectGeneFactory(method=sel)
fit<-sample(10, 15, replace=TRUE)
SelectGene(fit, lFselectGenes)