GARS_Selection {GARS}R Documentation

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

Description

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

Usage

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

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


[Package GARS version 1.12.0 Index]