Learn R Programming

jointseg (version 1.0.2)

doGFLars: Group fused Lars segmentation

Description

High-level function for multivariate fused Lars (GFLars) segmentation

Usage

doGFLars(Y, K, stat = NULL, ..., verbose = FALSE)

Arguments

Y

A n*p signal to be segmented

K

The number of change points to find

stat

A vector containing the names or indices of the columns of Y to be segmented

Further arguments to be passed to 'segmentByGFLars'

verbose

A logical value: should extra information be output ? Defaults to FALSE.

Value

An object of the same structure as the output of segmentByGFLars

Details

This function is a wrapper around the lower-level segmentation function segmentByGFLars. It can be run on p-dimensional, piecewise-constant data in order to defined a set of candidate change points. It is recommended to prune this list of candidates using dynamic programming (pruneByDP), combined with a selection of the best number of change points. The jointSeg function provides a convenient wrapper for performing segmentation, pruning and model selection.

For the specific case of DNA copy number data segmentation, see the dedicated wrapper PSSeg.

The default weights \(\sqrt{n/(i*(n-i))}\) are calibrated as suggested by Bleakley and Vert (2011). Using this calibration, the first breakpoint maximizes the likelihood ratio test (LRT) statistic.

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.

Examples

Run this code
# NOT RUN {
p <- 2
trueK <- 10
sim <- randomProfile(1e4, trueK, 1, p)
Y <- sim$profile
K <- 2*trueK
res <- doGFLars(Y, K)
print(res$bkp)
print(sim$bkp)
plotSeg(Y, res$bkp)

## a toy example with missing values
sim <- randomProfile(1e2, 1, 0.1, 2)
Y <- sim$profile
Y[3:50, 2] <- NA

res <- doGFLars(Y, 10, 2, verbose=TRUE)
print(res$bkp)
print(sim$bkp)
plotSeg(Y, res$bkp)

# }

Run the code above in your browser using DataLab