Open pneuvial opened 7 years ago
Some more code to perform model selection directly after the above code:
Y <- sim$profile
K <- length(2*sim$bkp)
res <- jointSeg(Y, method="RBS", K=K)
bkp <- res$bestBkp
resDP <- pruneByDP(sim$profile, candCP=res$initBkp)
modelSelection(resDP$rse, n=nrow(sim$profile), method="Lebarbier")
When using the default parameters, 'jointSeg' fails to recover the true breakpoints exactly in noiseless Gaussian profiles, e.g.:
gives the following results:
(b) RBS+DP+model selection à la Lebarbier underestimates the true number of breakpoints in more than 1/3 of cases:
@mpierrejean , what is the reference for the formula we are using in 'chooseK' ? In the original paper https://hal.archives-ouvertes.fr/inria-00071847 and in the Picard et al 2005 paper, the formula is
(where K is the number of segments), while in 'chooseK' it seems that we are using
Is there a reason for this difference? And why are we using c=2.5 ?