View source: R/univariate_mean.R
tuneBSunivar | R Documentation |
Perform univariate mean change points detection based on standard or wild binary segmentation. The threshold parameter tau for WBS is automatically selected based on the sSIC score defined in Equation (4) in Fryzlewicz (2014).
tuneBSunivar(BS_object, y)
BS_object |
A "BS" object produced by |
y |
A |
A list
with the following structure:
cpt |
A vector of estimated change point locations (sorted in strictly increasing order). |
tau |
A scalar of selected threshold tau based on sSIC. |
Daren Wang & Haotian Xu
Wang, Yu and Rinaldo (2020) <doi:10.1214/20-EJS1710>; Fryzlewicz (2014), Wild binary segmentation for multiple change-point detection, <DOI: 10.1214/14-AOS1245>.
BS.univar
and WBS.univar
.
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)) ## change points detection by WBS intervals = WBS.intervals(M = 100, lower = 1, upper = length(y)) temp2 = WBS.univar(y, 1, length(y), intervals$Alpha, intervals$Beta, delta = 5) WBS_result = tuneBSunivar(temp2, y) cpt_WBS = WBS_result$cpt Hausdorff.dist(cpt_WBS, cpt_true)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.