mutation: The default mutation operator in genetic algorithm

View source: R/GAfunc.R

mutationR Documentation

The default mutation operator in genetic algorithm

Description

In a certain probability, the mutation genetic operator can be applied to generate a new child. By default, the new child selection can be down by the similar individual selection method in population initialization, selectTau.

Usage

mutation(child, p.range = NULL, minDist, Pb, lmax, mmax, N)

Arguments

child

The child chromosome resulting from the crossover genetic operator.

p.range

Default is NULL for only changepoint detection. If p.range is specified as a list object, which contains the range of each model order parameters for order selection (integers). The number of order parameters must be equal to the length of p.range.

minDist

The required minimum distance between two adjacent changepoints.

Pb

The probability of changepoints for every time series.

lmax

The user specified maximum number of changepoints, by default, as N/2 - 1.

mmax

The user specified maximum length of individual chromosome, by default, as 2+N/2 + 1.

N

The sample size of the time series.

Details

A function can apply mutation to the produced child with the specified probability Pmutation in GA_param and IslandGA_param. If order selection is not requested (option = "cp" in GA_param and Island_GA), the default mutation operator function uses selectTau to select a completely new individual with a new chromosome as the mutated child. For details, see selectTau. If order selection is needed (option = "both" in GA_param and Island_GA), we first decide whether to keep the produced child's model order with a probability of 0.5. If the child's model order is retained, the selectTau function is used to select a completely new individual with a new chromosome as the mutated child. If a new model order is selected from the candidate model order set, there is a 0.5 probability to either select a completely new individual with new changepoint locations or retain the original child's changepoint locations for the mutated child. Note that the current model orders in the child's chromosome are excluded from the set to avoid redundant objective function evaluation. Finally, the function returns a vector containing the modified chromosomes for mutated child.

Value

The resulting child chromosome representation.


changepointGA documentation built on April 4, 2025, 4:39 a.m.