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:

  1. "Uniform" returns SelectUniform.

  2. "UniformP" returns SelectUniformP.

  3. "ProportionalOnln" returns SelectPropFitOnln.

  4. "Proportional" returns SelectPropFit.

  5. "ProportionalM" returns SelectPropFitM.

  6. "PropFitDiffOnln" returns SelectPropFitDiffOnln.

  7. "PropFitDiff" returns SelectPropFitDiff.

  8. "PropFitDiffM" returns SelectPropFitDiffM.

  9. "Tournament" returns SelectTournament.

  10. "STournament" returns SelectSTournament.

  11. "Duel" returns SelectDuel.

  12. "LRSelective" returns SelectLRSelective.

  13. "LRTSR" returns SelectLinearRankTSR.

  14. "SUS" returns a function factory for SelectSUS.

Usage

SelectGeneFactory(method = "PropFitDiffOnln")

Arguments

method

A string specifying the selection function.

Details

If SelectionContinuation()==TRUE then:

  1. In package xegaPopulation function NextPopulation, first the functions SelectGene and SelectMate are transformed by TransformSelect to a continuation function with embedded index vector and counter.

  2. For each call in ReplicateGene, SelectGene and SelectMate 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) 

[Package xegaSelectGene version 1.0.0.0 Index]