powered by
Perform dynamic programming algorithm for univariate polynomials change points detection.
DP.poly(y, r, gamma, delta)
A list with the following structure:
list
An object of class "DP", which is a list with the following structure:
class
A vector of the best partition.
A vector of mean estimation for corresponding to the best partition.
A vector of change points estimation.
A numeric vector of observations.
numeric
An integer scalar order of polynomials.
integer
A numeric scalar of the tuning parameter associated with the \(l_0\) penalty.
A strictly integer scalar of minimum spacing.
Haotian Xu
Yu and Chatterjee (2020) <arXiv:2007.09910>
set.seed(0) cpt_true = c(20, 50, 170) y = rnorm(300) + c(rep(0,20),rep(2,30),rep(0,120),rep(2,130)) plot.ts(y) temp = DP.poly(y, r = 2, gamma = 15, delta = 5) temp$cpt
Run the code above in your browser using DataLab