random_population {changepointGA} | R Documentation |
Random population initialization
Description
Randomly generate the individuals' chromosomes (changepoint confirgurations) to construct the first generation population.
Usage
random_population(popsize, prange, N, minDist, Pb, mmax, lmax)
Arguments
popsize |
An integer represents the number of individual in each population for GA (or subpopulation for IslandGA). |
prange |
Default is |
N |
The length of time series. |
minDist |
The minimum length between two adjacent changepoints. |
Pb |
Same as |
mmax |
The maximum possible number of changepoints in the data set. |
lmax |
The maximum possible length of the chromosome representation. |
Details
The default population initialization uses selectTau
to
select the chromosome for the first generation population. Each column from
the produced population matrix represent an chromosome of an individual.
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.