powered by
Recursive binary segmentation for changepoint detection. Greedy algorithm that recursively splits at the best changepoint.
binary_segmentation( data, type = "both", penalty = "BIC", min_segment = 2, n_changepoints = "multiple", threshold = NULL, ... )
List with changepoints
Numeric vector or matrix
Type of change to detect
Penalty for adding changepoints
Minimum segment length
Maximum number of changepoints to detect
Significance threshold
Additional arguments
data <- c(rnorm(100), rnorm(100, mean = 2)) result <- binary_segmentation(data)
Run the code above in your browser using DataLab