segment_cga {tidychangepoint} | R Documentation |
Segment a time series using a genetic algorithm
Description
Segmenting functions for various genetic algorithms
Usage
segment_cga(x, ...)
Arguments
x |
A time series |
... |
arguments passed to |
Details
segment_cga()
uses the genetic algorithm in GA::ga()
to "evolve" a random
set of candidate changepoint sets, using the penalized objective function
specified by penalty_fn
.
By default, the normal meanshift
model is fit (see fit_meanshift_norm()
)
and the BIC penalty is applied.
Value
A cga
object. This is just a changepointGA::GA()
object with an additional
slot for data
(the original time series).
Examples
# Segment a time series using a genetic algorithm
res <- segment_cga(CET)
summary(res)
# Segment a time series using changepointGA
x <- segment(CET, method = "cga")
summary(x)
changepoints(x)
[Package tidychangepoint version 1.0.1 Index]