Description Usage Arguments Value Author(s) See Also Examples
View source: R/GARS_mutation.R
This function implements the mutation step in the GA. First, it checks and replace duplicate features in each chromosomes; then, random mutation are applied to the entire population.
1 | GARS_Mutation(chr.pop, mut.rate = 0.01, totFeats)
|
chr.pop |
A matrix or a data.frame representing the chromosomes population: each column is a chromosome and each element correspond to the feature position in the data matrix |
mut.rate |
The probability to apply a random mutation to each element. It must be between 0 and 1. Default is 0.01 |
totFeats |
The total number of features. Often, it corresponds to number of columns of the data matrix |
A matrix representing the "mutated" population. The dimensions of this matrix are the same of 'chr.pop'
Mattia Chiesa, Luca Piacentini
GARS_Elitism
,
GARS_Selection
,
GARS_Crossover
,
1 2 3 4 5 6 | # use example data:
data(GARS_popul)
data(GARS_data_norm)
mutated_pop <- GARS_Mutation(GARS_popul, mut.rate=0.1,
dim(GARS_data_norm)[2])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.