GARS_Selection: Perform the "Roulette Wheel" or the "Tournament" selection

Description Usage Arguments Value Author(s) See Also Examples

View source: R/GARS_selection.R

Description

This function implements two kind of GA Selection step: the "Roulette Wheel" and the "Tournament" selection.

Usage

1
GARS_Selection(chr.pop, type = c("RW", "TS"), fitn.values)

Arguments

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'

Value

A matrix representing the "selected" population. The dimensions of this matrix are the same of 'chr.pop'.

Author(s)

Mattia Chiesa, Luca Piacentini

See Also

GARS_Mutation, GARS_Crossover, GARS_Elitism,

Examples

1
2
3
4
# use example data:
data(GARS_popul)
data(GARS_Fitness_score)
selected_pop <- GARS_Selection(GARS_popul, "RW", GARS_Fitness_score)

GARS documentation built on Nov. 8, 2020, 7:23 p.m.