uniformcrossover: Uniform crossover to produce offsprings

View source: R/RcppExports.R

uniformcrossoverR Documentation

Uniform crossover to produce offsprings

Description

In uniform crossover, typically, each bit is chosen from either parent with equal probability. Other mixing ratios are sometimes used, resulting in offspring which inherit more genetic information from one parent than the other. In a uniform crossover, we don’t divide the chromosome into segments, rather we treat each gene separately. In this, we essentially flip a coin for each chromosome to decide whether or not it will be included in the off-spring. If model order selection is requested, each child's model order has the equal probability (0.5) from dad and mom.

Usage

uniformcrossover(mom, dad, prange, minDist, lmax, N)

Arguments

mom

Among two selected individuals, mom represents the selected chromosome representation with lower fitness function value.

dad

Among two selected individuals, dad represents the selected chromosome representation with larger fitness function value.

prange

Default value is NULL for only changepoint detection. If prange 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 prange.

minDist

The required minimum distance between two adjacent changepoints.

lmax

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

N

The length of time series.

Value

The child chromosome that produced from mom and dad for next generation.


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