ks.cp3o_delta: CHANGE POINTS ESTIMATION BY PRUNED OBJECTIVE (VIA...

View source: R/cp3o.R

ks.cp3o_deltaR Documentation

CHANGE POINTS ESTIMATION BY PRUNED OBJECTIVE (VIA KOLMOGOROV-SMIRNOV STATISTIC)

Description

An algorithm for multiple change point analysis that uses dynamic programming and pruning. The Kolmogorov-Smirnov statistic is used as the goodness-of-fit measure.

Usage

ks.cp3o_delta(Z, K=1, minsize=30, verbose=FALSE)

Arguments

Z

A T x d matrix containing the length T time series with d-dimensional observations.

K

The maximum number of change points.

minsize

The minimum segment size. This is also the window size used to calculate between-segment distances.

verbose

A flag indicating if status updates should be printed.

Details

Segmentations are found through the use of dynamic programming and pruning. Between-segment distances are calculated only using points within a window of the segmentation point.

Value

The returned value is a list with the following components.

number

The estimated number of change points.

estimates

The location of the change points estimated by the procedure.

gofM

A vector of goodness of fit values for differing number of change points. The first entry corresponds to when there is only a single change point, the second for when there are two, and so on.

cpLoc

The list of locations of change points estimated by the procedure for different numbers of change points up to K.

time

The total amount to time take to estimate the change point locations.

Author(s)

Wenyu Zhang

References

W. Zhang, N. A. James and D. S. Matteson, "Pruning and Nonparametric Multiple Change Point Detection," 2017 IEEE International Conference on Data Mining Workshops (ICDMW), New Orleans, LA, 2017, pp. 288-295.

See Also

Kifer D., Ben-David S., Gehrke J. (2004). Detecting change in data streams. International Conference on Very Large Data Bases.

Examples

set.seed(400)
x = matrix(c(rnorm(100),rnorm(100,3),rnorm(100,0,2)))
y = ks.cp3o_delta(Z=x, K=7, minsize=30, verbose=FALSE)
#View estimated change point locations
y$estimates

ecp documentation built on Sept. 12, 2024, 7:40 a.m.

Related to ks.cp3o_delta in ecp...