AMOCpopulation: Random population initialization for AMOC problem

View source: R/AMOCfunc.R

AMOCpopulationR 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 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.

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.


changepointGA documentation built on June 8, 2025, 1:12 p.m.