Description Usage Arguments Value Author(s) See Also Examples
View source: R/GARS_selection.R
This function implements two kind of GA Selection step: the "Roulette Wheel" and the "Tournament" selection.
1 | 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
,
1 2 3 4 | # use example data:
data(GARS_popul)
data(GARS_Fitness_score)
selected_pop <- GARS_Selection(GARS_popul, "RW", GARS_Fitness_score)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.