powered by
Comprehensive evaluation of detection results against known ground truth. Computes multiple metrics for localization, segmentation, and detection.
evaluate(result, true_changepoints, n = NULL, tolerance = 5)
A list of class "regime_evaluation" containing all metrics
A regime_result object or vector of changepoint locations
Vector of true changepoint locations
Total number of observations (required if result is a vector)
Tolerance window for matching changepoints (for F1 score)
true_cp <- c(50, 100) data <- c(rnorm(50), rnorm(50, mean = 2), rnorm(50)) result <- detect_regimes(data) evaluation <- evaluate(result, true_cp) print(evaluation)
Run the code above in your browser using DataLab