Learn R Programming

tidychangepoint (version 1.0.0)

segment_manual: Manually segment a time series

Description

Segment a time series by manually inputting the changepoint set

Usage

segment_manual(x, tau, ...)

Value

A seg_cpt object

Arguments

x

A time series

tau

a set of indices representing a changepoint set

...

arguments passed to seg_cpt

Details

Sometimes you want to see how a manually input set of changepoints performs. This function takes a time series and a changepoint detection set as inputs and returns a seg_cpt object representing the segmenter. Note that by default fit_meanshift_norm() is used to fit the model and BIC() is used as the penalized objective function.

Examples

Run this code
# Segment a time series manually
segment_manual(CET, tau = c(84, 330))
segment_manual(CET, tau = NULL)

Run the code above in your browser using DataLab