View source: R/gene_operator.R
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
1 | gene_selection(method, points, p1, p2, k, n_var, mu)
|
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 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.