Object-Oriented Interface for Offline Change-Point Detection

A collection of efficient implementations of popular offline change-point detection algorithms, featuring a consistent, object-oriented interface for practical use.


Welcome to rupturesRcpp

R-CMD-check Maintenance rupturesRcpp status badge CRAN Version CRAN Downloads codecov

rupturesRcpp is an R package for high-performance offline change-point detection in multivariate time series. It provides a unified, object-oriented R6 interface to change-point detection methods implemented efficiently in C++. It is inspired by the highly popular Python library ruptures.

The package detects changes in the underlying structure of a time series, including changes in mean, covariance, autoregressive dynamics, and regression relationships with covariates. It supports a range of cost functions, and segmentation algorithms, from fast heuristic methods to exact dynamic-programming and penalised optimisation methods.

Documentation and case studies are available on the package website. See Getting started for the differences between the two versions and a first detection.

Supported Methods

Cost Functions

Cost function Detects changes in
"L1", "L2" Mean structure; "L1" provides greater robustness to outliers
"SIGMA" Mean and covariance structure
"VAR" Vector autoregressive dynamics
"LinearL2", "LinearL1" Linear regression relationships with covariates; "LinearL1" provides greater robustness to outliers
"LinearSIGMA" Regression relationships and residual covariance
"Custom" User-defined structural changes through an R cost function

Segmentation Methods

Method Search strategy
binSeg Binary segmentation; a fast greedy search
Window Sliding-window search based on local changes
PELT Penalised optimisation with pruning
Dynp Dynamic programming for a specified number of change-points

Installation

# Development version, documented on the package website
install.packages("rupturesRcpp",
                 repos = c("https://edelweiss611428.r-universe.dev",
                           "https://cloud.r-project.org"))

# CRAN release (1.0.3)
install.packages("rupturesRcpp")

Acknowledgement

The package was developed during Google Summer of Code 2025 for The R Project for Statistical Computing by @edelweiss611428, under the mentorship of @tdhock and @deepcharles. The original GSoC project archive is available on the gsoc-2025 branch.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("rupturesRcpp")

2.0.0 by Minh Long Nguyen, 15 days ago


https://edelweiss611428.github.io/rupturesRcpp/, https://github.com/edelweiss611428/rupturesRcpp


Report a bug at https://github.com/edelweiss611428/rupturesRcpp/issues


Browse source code at https://github.com/cran/rupturesRcpp


Authors: Minh Long Nguyen [aut, cre] , Toby Hocking [aut] , Charles Truong [aut] , Huy Nhat Minh Nguyen [ctb]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports Rcpp, R6, ggplot2, patchwork, methods

Suggests testthat, reticulate, binsegRcpp, covr

Linking to Rcpp, RcppArmadillo


See at CRAN