jointSeg {jointseg} | R Documentation |
Joint segmentation of multivariate signals
Description
Joint segmentation of multivariate signals in two steps:
first-pass segmentation. By default, a fast, greedy approach is used (see
method
).pruning of the candidate change points obtained by dynamic programming
Usage
jointSeg(Y, method = "RBS", stat = NULL, dpStat = stat,
segFUN = NULL, jitter = NULL,
modelSelectionMethod = ifelse(match(method, c("DynamicProgramming",
"RBS", "GFLars"), nomatch = 0) > 0, "Lebarbier", "none"),
modelSelectionOnDP = (match(method, c("DynamicProgramming", "RBS",
"GFLars"), nomatch = 0) > 0), ..., profile = FALSE, verbose = FALSE)
Arguments
Y |
The signal to be segmented (a matrix or a numeric vector) |
method |
A
|
stat |
A vector containing the names or indices of the columns of
|
dpStat |
A vector containing the names or indices of the columns of
|
segFUN |
The segmentation function to be used when |
jitter |
Uncertainty on breakpoint position after initial segmentation.
Defaults to |
modelSelectionMethod |
A character value, the name of the method used to perform model selection. |
modelSelectionOnDP |
A logical value. If |
... |
Further arguments to be passed to the lower-level segmentation
method determined by argument |
profile |
A |
verbose |
A |
Details
If modelSelectionOnDP
is set to FALSE
, then model selection is
run on the sets of the form bkp[1:k]
for 1 \leq k \leq
length(bkp)
, where bkp
is the set of breakpoints identified by the
initial segmentation. In particular, this implies that the candidate
breakpoints in bkp
are sorted by order of appearance and not by
position.
If jitter
is not NULL
, it should be a vector of integer
indices. The set of candidate breakpoints passed on to dynamic programming is
augmented by all indices distant from an element of jitter
from one of
the candidates. For example, if jitter==c(-1, 0, 1)
and the initial
set of breakpoints is c(1,5)
then dynamic programming is run on
c(1,2,4,5,6)
.
If the return value of the initial segmentation has an element named
dpseg
, then initial segmentation results are not pruned by dynamic
programming.
References
Bleakley, K., & Vert, J. P. (2011). The group fused lasso for multiple change-point detection. arXiv preprint arXiv:1106.4199.
Vert, J. P., & Bleakley, K. (2010). Fast detection of multiple change-points shared by many signals using group LARS. Advances in Neural Information Processing Systems, 23, 2343-2351.
Gey, S., & Lebarbier, E. (2008). Using CART to Detect Multiple Change Points in the Mean for Large Sample. http://hal.archives-ouvertes.fr/hal-00327146/
Rigaill, G. (2010). Pruned dynamic programming for optimal multiple change-point detection. arXiv preprint arXiv:1004.0887.
See Also
Examples
## A two-dimensional signal
p <- 2
trueK <- 10
len <- 1e4
sim <- randomProfile(len, trueK, 1, p)
Y <- sim$profile
K <- 2*trueK
res <- jointSeg(Y, method="RBS", K=K)
bkp <- res$bestBkp
getTpFp(bkp, sim$bkp, tol=5, relax = -1) ## true and false positives
plotSeg(Y, list(sim$bkp, res$bestBkp), col=1)
## Now we add some NA:s in one dimension
jj <- sim$bkp[1]
Y[jj-seq(-10,10), p] <- NA
res2 <- jointSeg(Y, method="RBS", K=K, verbose=TRUE)
bkp <- res2$bestBkp
getTpFp(res2$bestBkp, sim$bkp, tol=5, relax = -1) ## true and false positives