GARS_Selection {GARS} | R Documentation |
This function implements two kind of GA Selection step: the "Roulette Wheel" and the "Tournament" selection.
GARS_Selection(chr.pop, type = c("RW", "TS"), fitn.values)
chr.pop |
A matrix or a data.frame representing the chromosomes population: each column is a chromosome and each element corresponds to the feature position in the data matrix |
type |
The type of selection method; Roulette Wheel ("RW") and Tournament Selection ("TS") are allowed. Default is "RW" |
fitn.values |
A numeric vector where each element corresponds to the fitness score of each chromosome in 'chr.pop' |
A matrix representing the "selected" population. The dimensions of this matrix are the same of 'chr.pop'.
Mattia Chiesa, Luca Piacentini
GARS_Mutation
,
GARS_Crossover
,
GARS_Elitism
,
# use example data: data(GARS_popul) data(GARS_Fitness_score) selected_pop <- GARS_Selection(GARS_popul, "RW", GARS_Fitness_score)