Learn R Programming

RegimeChange (version 0.1.1)

simulated_changepoints: Simulated Changepoints Benchmark Dataset

Description

A collection of simulated datasets with known changepoints for benchmarking changepoint detection methods.

Usage

simulated_changepoints

Arguments

Format

A list with multiple scenarios:

single_mean

Single mean change from 0 to 3

single_variance

Single variance change from 1 to 9

multiple_mean

Three mean changes

gradual

Gradual trend change (challenging)

small_change

Small mean change of 0.5 SD (challenging)

close_changepoints

Three closely spaced changepoints (challenging)

heavy_tailed

Mean change with t-distributed noise

multivariate

Bivariate mean and covariance change

Each scenario contains:

  • data: The time series data

  • true_changepoints: Vector of true changepoint locations

  • type: Type of change (mean, variance, etc.)

  • description: Description of the scenario

Examples

Run this code
# \donttest{
data(simulated_changepoints)

# Run benchmark on single mean scenario
scenario <- simulated_changepoints$single_mean
result <- detect_regimes(scenario$data, method = "pelt")
evaluate(result, true_changepoints = scenario$true_changepoints)

# Compare multiple methods
comparison <- compare_methods(
  data = scenario$data,
  methods = c("pelt", "bocpd", "binseg"),
  true_changepoints = scenario$true_changepoints
)
print(comparison)
# }

Run the code above in your browser using DataLab