gene_selection: Genetic operator: 1. Performs the k points crossover from 2...

Description Usage Arguments

View source: R/gene_operator.R

Description

Genetic operator: 1. Performs the k points crossover from 2 parents over n_var genes at the indices given in the vector 'points' 2. Sample k locis and swap the alleles at these locis among the 2 parents. 3. Gene mutation at a specific rate

Usage

1
gene_selection(method, points, p1, p2, k, n_var, mu)

Arguments

method

a string inside quotation marks either "crossover", "random"

points

crossover points

p1, p2

the 2 parents: lists with fields (variables, indices, linear_model)

k

number of locis to be swapped

n_var

length of the chromosome

mu

mutation rate


Skjemaa/GA documentation built on Dec. 17, 2017, 6:23 p.m.