Learn R Programming

jointseg (version 1.0.2)

Fpsn: Pruned dynamic programming algorithm

Description

Low-level API for the pruned dynamic programming algorithm (pDPA)

Usage

Fpsn(x, Kmax, mini = min(x), maxi = max(x))

Arguments

x

A vector of double : the signal to be segmented

Kmax

Max number of segments

mini

Min value for the mean parameter of the segment

maxi

Max value for the mean parameter of the segment

Value

A list with a vector containing the position of the change-points

Details

This implementation uses functional pruning and segment neighborhood, and the L2-loss function

References

Rigaill, G. (2015). A pruned dynamic programming algorithm to recover the best segmentations with 1 to K_max change-points. Journal de la Societe Francaise de Statistique, 156(4), 180-205.

See Also

doDynamicProgramming for a higher-level function

Examples

Run this code
# NOT RUN {
## load known real copy number regions
affyDat <- acnr::loadCnRegionData(dataSet="GSE29172", tumorFraction=1)

## generate a synthetic CN profile
K <- 10
len <- 1e4
sim <- getCopyNumberDataByResampling(len, K, minLength=100, regData=affyDat)
datS <- sim$profile

## run pruned DPA segmentation
res <- Fpsn(datS[["c"]], Kmax=2*K+1)

## plot segmentation results for the true number of breakpoints
bkp <- res$t.est[K+1, 1:K]
plotSeg(datS, breakpoints=bkp)
# }

Run the code above in your browser using DataLab