GARS_Mutation: Perform the Mutation step

Description Usage Arguments Value Author(s) See Also Examples

View source: R/GARS_mutation.R

Description

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.

Usage

1
GARS_Mutation(chr.pop, mut.rate = 0.01, totFeats)

Arguments

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

Value

A matrix representing the "mutated" population. The dimensions of this matrix are the same of 'chr.pop'

Author(s)

Mattia Chiesa, Luca Piacentini

See Also

GARS_Elitism, GARS_Selection, GARS_Crossover,

Examples

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])

BioinfoMonzino/GARS documentation built on Aug. 2, 2021, 1:08 a.m.