Joint segmentation of multivariate signals
Description
Joint segmentation of multivariate signals in two steps:
firstpass segmentation. By default, a fast, greedy approach is used (see
method
).pruning of the candidate change points obtained by dynamic programming
Usage
1 2 3 4 5 6  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 
Which method is used to perform model selection. 
modelSelectionOnDP 
If 
... 
Further arguments to be passed to the lowerlevel segmentation
method determined by argument 
profile 
Trace time and memory usage ? 
verbose 
A 
Details
If the return value of the initial segmentation has an
element named dpseg
, then initial segmentation results
are not pruned by dynamic programming.
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
modelSelectionOnDP
is set to FALSE
, then model
selection is run on the sets of the form bkp[1:k]
for
1 ≤q k ≤q 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.
Value
A list with elements:
bestBkp 
Best set of breakpoints after dynamic programming 
initBkp 
Results of the initial segmentation, using
'doNnn', where 'Nnn' corresponds to argument

dpBkpList 
Results of dynamic programming, a list
of vectors of breakpoint positions for
the best model with k breakpoints for
k=1, 2, ... K where

prof 
a 
Author(s)
Morgane PierreJean and Pierre Neuvial
References
Bleakley, K., & Vert, J. P. (2011). The group fused lasso for multiple changepoint detection. arXiv preprint arXiv:1106.4199.
Vert, J. P., & Bleakley, K. (2010). Fast detection of multiple changepoints shared by many signals using group LARS. Advances in Neural Information Processing Systems, 23, 23432351.
Gey, S., & Lebarbier, E. (2008). Using CART to Detect Multiple Change Points in the Mean for Large Sample. http://hal.archivesouvertes.fr/hal00327146/
Rigaill, G. (2010). Pruned dynamic programming for optimal multiple changepoint detection. arXiv preprint arXiv:1004.0887.
Bellman, R. (1956). Dynamic programming and Lagrange multipliers. Proceedings of the National Academy of Sciences of the United States of America, 42(10), 767.
See Also
pruneByDP
Examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19  ## A twodimensional 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[jjseq(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

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.