modelSelection {jointseg} | R Documentation |
Model selection
Description
Select the best number of breakpoints
Usage
modelSelection(rse, n, c = 2.5, lambdas = NULL, method = c("Birge",
"Lebarbier"))
Arguments
rse |
RSE as output by |
n |
Length of the profile |
c |
Parameter for the model selection |
lambdas |
A list of candidate values for the calibration of the penalty |
method |
Method to calibrate the constant in the penalty for model selection |
Details
This function is not intended to be called directly, but implicitly through
jointSeg
or PSSeg
.
Value
A list with elements
- kbest
the best number of breakpoints
- lambda
A numerical value, the result of an internal model selection function
Author(s)
Morgane Pierre-Jean and Pierre Neuvial
References
Lebarbier, E. (2005). Detecting multiple change-points in the mean of Gaussian process by model selection. Signal processing, 85(4), 717-736
Birg\'e, L. (2001). Gaussian model selection. J.Eur Math. Soc, 3(3):203-268
See Also
Examples
## load known real copy number regions
affyDat <- acnr::loadCnRegionData(dataSet="GSE29172", tumorFraction=1)
sim <- getCopyNumberDataByResampling(1e4, 5, minLength=100, regData=affyDat)
Y <- as.matrix(sim$profile[, "c"])
## Find candidate breakpoints
K <- 50
resRBS <- segmentByRBS(Y, K=K)
## Prune candidate breakpoints
resDP <- pruneByDP(Y, candCP=resRBS$bkp)
selectedModel <- modelSelection(rse=resDP$rse, n=nrow(Y), method="Lebarbier")
str(selectedModel)
## breakpoints of the best model
bestBkp <- resDP$bkp[[selectedModel$kbest]]
print(bestBkp)
## truth
print(sim$bkp)
## Note that all of the above can be done directly using 'PSSeg'
res <- PSSeg(sim$profile, method="RBS", stat="c", K=K)
## stopifnot(identical(res$bestBkp, bestBkp))
[Package jointseg version 1.0.2 Index]