powered by
Runs multiple detection methods on the same data and compares results.
compare_methods( data, methods = c("pelt", "binseg", "wbs", "bocpd"), true_changepoints = NULL, tolerance = 5, ... )
Object of class "regime_comparison"
Numeric vector or matrix
Character vector of method names
Vector of true changepoints (for evaluation)
Tolerance for evaluation metrics
Additional arguments passed to detect_regimes
true_cp <- c(50, 100) data <- c(rnorm(50), rnorm(50, mean = 2), rnorm(50)) comparison <- compare_methods( data, methods = c("pelt", "binseg"), true_changepoints = true_cp )
Run the code above in your browser using DataLab