DP.poly {changepoints} | R Documentation |
Dynamic programming algorithm for univariate polynomials change points detection.
Description
Perform dynamic programming algorithm for univariate polynomials change points detection.
Usage
DP.poly(y, r, gamma, delta)
Arguments
y |
A |
r |
An |
gamma |
A |
delta |
A strictly |
Value
A list
with the following structure:
An object of class
"DP", which is a list
with the following structure:
partition |
A vector of the best partition. |
yhat |
A vector of mean estimation for corresponding to the best partition. |
cpt |
A vector of change points estimation. |
Author(s)
Haotian Xu
References
Yu and Chatterjee (2020) <arXiv:2007.09910>
Examples
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
[Package changepoints version 1.1.0 Index]