hybrid.cpt {breakfast}R Documentation

Multiple change-point detection in the mean of a vector using a hybrid between the TGUH and Adaptive WBS methods.

Description

This function estimates the number and locations of change-points in the piecewise-constant mean of the noisy input vector, combining the Tail-Greedy Unbalanced Haar and Adaptive Wild Binary Segmentation methods (see Details for the relevant literature references). The constant means between each pair of neighbouring change-points are also estimated. The method works best when the noise in the input vector is independent and identically distributed Gaussian.

Usage

hybrid.cpt(x, M = 1000, sigma = stats::mad(diff(x)/sqrt(2)), th.const = 1,
  p = 0.01, minseglen = 1, bal = 1/20, num.zero = 10^(-5))

Arguments

x

A vector containing the data in which you wish to find change-points.

M

The same as the corresponding parameter in wbs.K.cpt.

sigma

The same as the corresponding parameter in tguh.cpt.

th.const

The same as the corresponding parameter in tguh.cpt.

p

The same as the corresponding parameter in tguh.cpt.

minseglen

The same as the corresponding parameter in tguh.cpt.

bal

The same as the corresponding parameter in tguh.cpt.

num.zero

The same as the corresponding parameter in tguh.cpt.

Details

This is a hybrid method, which first estimates the number of change-points using tguh.cpt and then estimates their locations using wbs.K.cpt.

The change-point detection algorithms used in tguh.cpt are: the Tail-Greedy Unbalanced Haar method as described in "Tail-greedy bottom-up data decompositions and fast multiple change-point detection", P. Fryzlewicz (2017), preprint, and Adaptive Wild Binary Segmentation as described in "Data-adaptive Wild Binary Segmentation", P. Fryzlewicz (2017), in preparation as of September 28th, 2017.

Value

A list with the following components:

est

The estimated piecewise-constant mean of x.

no.of.cpt

The estimated number of change-points in the piecewise-constant mean of x.

cpt

The estimated locations of change-points in the piecewise-contant mean of x (these are the final indices before the location of each change-point).

Author(s)

Piotr Fryzlewicz, p.fryzlewicz@lse.ac.uk

See Also

segment.mean, wbs.bic.cpt, wbs.thresh.cpt, wbs.cpt, tguh.cpt, wbs.K.cpt

Examples

teeth <- rep(rep(0:1, each=5), 20)
teeth.noisy <- teeth + rnorm(200)/5
teeth.cleaned <- hybrid.cpt(teeth.noisy)
ts.plot(teeth.cleaned$est)

[Package breakfast version 1.0.0 Index]