select_parents: select_parents

Description Usage Arguments Value

View source: R/utils.R

Description

This function returns pairs of parents for breeding

Usage

1
select_parents(fitness_values, mechanism, random = random, P, c)

Arguments

fitness_values

(vector P): fitness_value of each of the candidate of the current generation

P

(int): number of candidates per generation

mechanism:

user defined rank-based selection mechanism, must be one of c("replace_all","tournament", "partial_replace")

random:

A boolean value(T/F), "T" if choosing 1 parent selected proportional to fitness + 1 parent random selected and "F" if 2 parents selected proportional to to fitness

generation

gap: proportion of the generation to be replaced by offspring output:

Value

parents (matrix P x 2): each row is a pair of indices of parents

candidate(P x c): Each row is a candidate model for breeding


jtkwar/GA documentation built on May 28, 2019, 7:36 a.m.