View source: R/univariate_mean.R
local.refine.univar | R Documentation |
Perform local refinement for univariate mean change points detection.
local.refine.univar(cpt_init, y)
cpt_init |
An |
y |
A |
An integer
vector of locally refined change point estimation.
Haotian Xu
Wang, Yu and Rinaldo (2020) <doi:10.1214/20-EJS1710>.
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)) gamma_set = 1:5 DP_result = CV.search.DP.univar(y, gamma_set, delta = 5) min_idx = which.min(DP_result$test_error) cpt_hat = unlist(DP_result$cpt_hat[min_idx]) Hausdorff.dist(cpt_hat, cpt_true) cpt_LR = local.refine.univar(cpt_hat, y) Hausdorff.dist(cpt_LR, cpt_true)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.