| ks.cp3o {ecp} | R Documentation |
An algorithm for multiple change point analysis that uses dynamic programming and probabilistic pruning. The Kolmogorov-Smirnov statistic is used as the goodness-of-fit measure.
ks.cp3o(Z, K=1, minsize=30, eps=0.01, verbose=FALSE)
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. |
eps |
The epsilon probability used for the probabilistic pruning procedure. |
verbose |
A flag indicating if status updates should be printed. |
Segmentations are found through the use of dynamic programming and probabilistic pruning.
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 |
A list of all the optimal change point locations for differing numbers of change points. The first component corresponds to when there is only one change point, the second for when there are two change points, and so on. |
time |
The total amount to time take to estimate the change point locations. |
Wenyu Zhang
Kifer D., Ben-David S., Gehrke J. (2004). Detecting change in data streams. International Conference on Very Large Data Bases.
set.seed(400) x = matrix(c(rnorm(100),rnorm(100,3),rnorm(100,0,2))) y = ks.cp3o(Z=x, K=7, minsize=30, eps=0.01, verbose=FALSE) #View estimated change point locations y$estimates #View all possible segmentations for differing numbers of change points y$cpLoc