Description Usage Arguments Details Value Examples
Perform recombination on chromosomes
1 | Breed(population, method, scores, nPop, nGenes)
|
population |
Matrix of chromosomes currently in the population. |
method |
One of three methods for choosing which chromosomes pair before crossover.
|
scores |
List of scores for each model, generated by scoreFunc(). |
nPop |
Integer defining the population size. Equal to the length of population and scores. |
nGenes |
Integer number of genes provided by the user or calculated prior to running the model. |
This function performs crossovers between chromosomes to generate the next generation of population. It performs an elite style recombination, where the best scoring chromosome is always kept and the worst is removed, then applies one of 3 methods to determine the crossovers between the remaining chromosomes. Crossovers are then performed randomly within each pair.
A matrix of chromosomes, with nRow=nPop and nCol=nGenes.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.