AMOCpopulation {changepointGA} | R Documentation |
Random population initialization for AMOC problem
Description
Randomly generate the individuals' chromosomes (changepoint configurations) to construct the first generation population for the at most one changepoint (AMOC) problem.
Usage
AMOCpopulation(popsize, p.range, N, minDist, Pchangepoint, mmax, lmax)
Arguments
popsize |
An integer represents the number of individual in each population for GA (or subpopulation for IslandGA). |
p.range |
Default is |
N |
The length of time series. |
minDist |
The minimum length between two adjacent changepoints. |
Pchangepoint |
The probability that a changepoint can occur. |
mmax |
The maximum possible number of changepoints in the data set. |
lmax |
The maximum possible length of the chromosome representation. |
Details
Given the possible candidate changepoint location set, each chromosome in the first generation population can be obtained by randomly sampling one location from the candidate set. The first element of every chromosome represent the number of changepoints and the last non-zero element always equal to the length of time series plus one (N+1).
Value
A matrix that contains each individual's chromosome.