View source: R/univariate_polynomial.R
local.refine.poly | R Documentation |
Perform local refinement for univariate polynomials change point detection.
local.refine.poly(cpt_init, y, r, delta_lr)
cpt_init |
An |
y |
A |
r |
An |
delta_lr |
A positive |
An integer
vector of locally refined change point estimation.
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) 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.