compare_models: Compare various models or algorithms for a given changepoint...

View source: R/class-tidycpt.R

compare_modelsR Documentation

Compare various models or algorithms for a given changepoint set

Description

Compare various models or algorithms for a given changepoint set

Usage

compare_models(x, ...)

compare_algorithms(x, ...)

Arguments

x

A tidycpt object

...

currently ignored

Details

A tidycpt object has a set of changepoints returned by the algorithm that segmented the time series. That changepoint set was obtained using a specific model. Treating this changepoint set as fixed, the compare_models() function fits several common changepoint models to the time series and changepoint set, and returns the results of glance(). Comparing the fits of various models could lead to improved understanding.

Alternatively, compare_algorithms() runs several fast changepoint detection algorithms on the original time series, and consolidates the results.

Value

A tibble::tbl_df

Examples


# Segment a times series using PELT
x <- segment(CET, method = "pelt")

# Compare models
compare_models(x)

# Compare algorithms
compare_algorithms(x)


tidychangepoint documentation built on April 4, 2025, 4:31 a.m.