local.refine.poly {changepoints} | R Documentation |
Local refinement for univariate polynomials change point detection.
Description
Perform local refinement for univariate polynomials change point detection.
Usage
local.refine.poly(cpt_init, y, r, delta_lr)
Arguments
cpt_init |
An |
y |
A |
r |
An |
delta_lr |
A positive |
Value
An integer
vector of locally refined change point 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)
gamma_set = 3:9
DP_result = CV.search.DP.poly(y, r = 2, gamma_set, delta = 5)
min_idx = which.min(DP_result$test_error)
cpt_init = unlist(DP_result$cpt_hat[min_idx])
local.refine.poly(cpt_init, y, r = 2, delta_lr = 5)
[Package changepoints version 1.1.0 Index]