We present tidychangepoint, a new R package for changepoint detection analysis. Most R packages for segmenting univariate time series focus on providing one or two algorithms for changepoint detection that work with a small set of models and penalized objective functions, and all of them return a custom, nonstandard object type. This makes comparing results across various algorithms, models, and penalized objective functions unnecessarily difficult. tidychangepoint solves this problem by wrapping functions from a variety of existing packages and storing the results in a common S3 class called tidycpt. The package then provides functionality for easily extracting comparable numeric or graphical information from a tidycpt object, all in a tidyverse-compliant framework. tidychangepoint is versatile: it supports both deterministic algorithms like PELT (from changepoint), and also flexible, randomized, genetic algorithms (via GA) that -- via new functionality built into tidychangepoint -- can be used with any compliant model-fitting function and any penalized objective function. By bringing all of these disparate tools together in a cohesive fashion, tidychangepoint facilitates comparative analysis of changepoint detection algorithms and models.
翻译:本文介绍了 tidychangepoint,一个用于变点检测分析的新 R 软件包。大多数用于分割单变量时间序列的 R 软件包主要提供一两种变点检测算法,这些算法适用于少量模型和惩罚目标函数,并且它们都返回自定义的非标准对象类型。这使得跨不同算法、模型和惩罚目标函数的结果比较变得不必要的困难。tidychangepoint 通过封装来自多个现有软件包的函数,并将结果存储在名为 tidycpt 的通用 S3 类中,从而解决了这个问题。该软件包随后提供了从 tidycpt 对象中轻松提取可比较的数值或图形信息的功能,所有这些都遵循 tidyverse 兼容的框架。tidychangepoint 功能多样:它既支持确定性算法(如来自 changepoint 包的 PELT),也支持灵活的随机遗传算法(通过 GA 包实现)——借助 tidychangepoint 内置的新功能,这些算法可与任何兼容的模型拟合函数及任何惩罚目标函数结合使用。通过以连贯的方式整合所有这些不同的工具,tidychangepoint 促进了变点检测算法与模型的比较分析。