Efficiently computes optimal segmentations for a range of penalty values, useful for model selection.
crops_detect(
data,
penalty_range = c(0.1, 100),
method = "pelt",
min_segment = 2
)List with:
Penalty values tested
Number of changepoints for each penalty
List of changepoint vectors
Optimal costs
Numeric vector
Vector of length 2: c(min_penalty, max_penalty)
Segmentation method ("pelt" or "fpop")
Minimum segment length
Haynes, K., Eckley, I. A., and Fearnhead, P. (2017). Computationally efficient changepoint detection for a range of penalties. Journal of Computational and Graphical Statistics, 26(1), 134-143.