sbs.alg {hdbinseg} | R Documentation |
Sparsified Binary Segmentation
Description
Perform the Sparsified Binary Segmentation algorithm detecting change-points in the mean or second-order structure of the data.
Usage
sbs.alg(
x,
cp.type = c(1, 2)[1],
thr = NULL,
trim = NULL,
height = NULL,
tau = NULL,
temporal = TRUE,
scales = NULL,
diag = FALSE,
B = 1000,
q = 0.01,
do.parallel = 4
)
Arguments
x |
input data matrix, with each row representing the component time series |
cp.type |
|
thr |
pre-defined threshold values; when |
trim |
length of the intervals trimmed off around the change-point candidates; |
height |
maximum height of the binary tree; |
tau |
a vector containing the scaling constant for each row of |
temporal |
used when |
scales |
used when |
diag |
used when |
B |
used when |
q |
used when |
do.parallel |
used when |
Value
S3 bin.tree
object, which contains the following fields:
tree |
a list object containing information about the nodes at which change-points are detected |
mat |
matrix concatenation of the nodes of |
ecp |
estimated change-points |
thr |
threshold used to construct the tree |
References
H. Cho and P. Fryzlewicz (2014) Multiple-change-point detection for high dimensional time series via sparsified binary segmentation. JRSSB, vol. 77, pp. 475–507.
Examples
x <- matrix(rnorm(20*300), nrow = 20)
sbs.alg(x, cp.type = 2, scales = -1, diag = TRUE, do.parallel = 0)$ecp
x <- matrix(rnorm(100*300), nrow = 100)
x[1:10, 151:300] <- x[1:10, 151:300]*sqrt(2)
sbs.alg(x, cp.type = 2, scales = -1, diag = TRUE, do.parallel = 0)$ecp