Description Usage Arguments Value Author(s) See Also Examples
View source: R/GARS_crossover.R
This function implements the one-point and the two-point cross-over.
1 2 | GARS_Crossover(chr.pop, co.rate = 0.8, type = c("one.p", "two.p"),
one.p.quart = c("I.quart", "II.quart", "III.quart"))
|
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 |
co.rate |
The probability of each random couple of chromosomes to swap some parts. It must be between 0 and 1. Default is 0.8 |
type |
The type of crossover method; one-point ("one.p") and two-point ("two.p") are allowed. Default is "one.p" |
one.p.quart |
The position of the cromosome where performing the crossover, if "one.p" is selected. The first quartile ("I.quart"), the second quartile ("II.quart", i.e. the median) and the third quartile ("III.quart") are allowed. Default is "I.quart" |
A matrix representing the "crossed" population. The dimensions of this matrix are the same of 'chr.pop'
Mattia Chiesa, Luca Piacentini
GARS_Mutation
,
GARS_Selection
,
GARS_Elitism
,
1 2 3 4 5 | data(GARS_popul)
crossed_pop <- GARS_Crossover(GARS_popul, co.rate=0.9)
crossed_pop <- GARS_Crossover(GARS_popul, type="two.p")
crossed_pop <- GARS_Crossover(GARS_popul, type="one.p",
one.p.quart= "II.quart")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.