Package: fastcpd 1.2.2

Xingchi Li

fastcpd: Fast Change Point Detection via Sequential Gradient Descent

Implements fast change point detection algorithm based on the paper "Sequential Gradient Descent and Quasi-Newton's Method for Change-Point Analysis" by Xianyang Zhang, Trisha Dawn <https://proceedings.mlr.press/v206/zhang23b.html>. The algorithm is based on dynamic programming with pruning and sequential gradient descent. The C++ core is also exposed through a standalone C++ library interface for non-R consumers. See Li and Zhang (2026) <doi:10.18637/jss.v116.i06> for details.

Authors:Xingchi Li [aut, cre, cph], Xianyang Zhang [aut, cph]

fastcpd_1.2.2.tar.gz
fastcpd_1.2.2.zip(r-4.7-x86_64)fastcpd_1.2.2.zip(r-4.6-x86_64)fastcpd_1.2.2.zip(r-4.5-x86_64)
fastcpd_1.2.2.tgz(r-4.6-x86_64)fastcpd_1.2.2.tgz(r-4.6-arm64)fastcpd_1.2.2.tgz(r-4.5-x86_64)fastcpd_1.2.2.tgz(r-4.5-arm64)
fastcpd_1.2.2.tar.gz(r-4.7-arm64)fastcpd_1.2.2.tar.gz(r-4.7-x86_64)fastcpd_1.2.2.tar.gz(r-4.6-arm64)fastcpd_1.2.2.tar.gz(r-4.6-x86_64)
fastcpd_1.2.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
fastcpd/json (API)

# Install 'fastcpd' in R:
install.packages('fastcpd', repos = c('https://doccstat.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/doccstat/fastcpd-r/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:
  • bitcoin - Bitcoin Market Price
  • occupancy - Occupancy Detection Data Set
  • transcriptome - Transcription Profiling of 57 Human Bladder Carcinoma Samples
  • uk_seatbelts - UK Seatbelts Data
  • well_log - Well-log Dataset from Numerical Bayesian Methods Applied to Signal Processing

On CRAN:

Conda:

change-point-detectioncppcustom-functiongradient-descentlassolinear-regressionlogistic-regressionofflinepeltpenalized-regressionpoisson-regressionpypi-packagepythonpython3quasi-newtonstatisticstime-serieswarm-startopenblascppopenmp

6.27 score 24 stars 29 scripts 736 downloads 76 exports 27 dependencies

Last updated from:8eb5e276c7. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK474
linux-devel-x86_64OK483
source / vignettesOK849
linux-release-arm64OK490
linux-release-x86_64OK460
macos-release-arm64OK284
macos-release-x86_64OK837
macos-oldrel-arm64OK337
macos-oldrel-x86_64OK804
windows-develOK625
windows-releaseOK626
windows-oldrelOK510
wasm-releaseOK287

Exports:detectdetect_ardetect_arimadetect_armadetect_binomialdetect_exponentialdetect_garchdetect_kcpdetect_kerneldetect_lassodetect_linear_regressiondetect_lmdetect_logistic_regressiondetect_meandetect_mean_variancedetect_meanvariancedetect_poissondetect_poisson_regressiondetect_quantiledetect_quantile_regressiondetect_rankdetect_vardetect_varianceestimate_varianceestimate_variance_armaestimate_variance_linear_regressionestimate_variance_lmestimate_variance_meanestimate_variance_medianfastcpdfastcpd_arfastcpd_arimafastcpd_armafastcpd_binomialfastcpd_exponentialfastcpd_garchfastcpd_kcpfastcpd_lassofastcpd_lmfastcpd_meanfastcpd_meanvariancefastcpd_mvfastcpd_poissonfastcpd_quantilefastcpd_rankfastcpd_varfastcpd_variancefastcpd.arfastcpd.arimafastcpd.armafastcpd.binomialfastcpd.exponentialfastcpd.garchfastcpd.kcpfastcpd.lassofastcpd.lmfastcpd.meanfastcpd.meanvariancefastcpd.mvfastcpd.poissonfastcpd.quantilefastcpd.rankfastcpd.varfastcpd.varianceplotprintshowsummaryvariance_armavariance_lmvariance_meanvariance_medianvariance.armavariance.lmvariance.meanvariance.median

Dependencies:abseilbriocallrclicrayondescdiffobjevaluatefsgluejsonlitelifecyclemagrittrotelpkgbuildpkgloadpraiseprocessxpsR6RcppRcppArmadillorlangrprojroottestthatwaldowithr

Advanced examples
Vanilla percentage | Multiple epochs | Notes | Appendix: all code snippets

Last update: 2026-07-16
Started: 2023-12-20

Comparison with other R packages
Data setup | Univariate mean change | Univariate mean and/or variance change | Multivariate mean change | Multivariate mean and/or variance change | Linear regression | Logistic regression | Poisson regression | Lasso | AR(3) | GARCH(1, 1) | VAR(2) | Detection comparison using well_log | Time comparison using well_log | Notes | Related issues | Acknowledgements | Appendix: all code snippets

Last update: 2026-07-16
Started: 2023-12-20

Comparison with vanilla PELT
Setup | Logistic regression | Poisson regression | Penalized linear regression | Notes | Appendix: all code snippets

Last update: 2026-07-16
Started: 2023-12-20

Custom logistic regression model
Compiled (C++) custom cost functions | Notes | Appendix: all code snippets

Last update: 2026-07-16
Started: 2024-02-22

Exploration during development
Exploration of the QMLE method for ARMA models | Notes | Appendix: all code snippets

Last update: 2026-07-16
Started: 2025-03-09

Time Complexity Analysis in fastcpd
Introduction | Time Complexity Simulation for detect_mean() | Impact of SeDG in detect_lasso() | Notes | Appendix: all code snippets

Last update: 2026-07-16
Started: 2025-03-11

Readme and manuals

Help Manual

Help pageTopics
Bitcoin Market Price (USD)bitcoin
Confidence intervals for a fastcpd objectconfint.fastcpd
Find change points efficientlydetect fastcpd
Find change points efficiently in AR(p) modelsdetect_ar fastcpd.ar fastcpd_ar
Find change points efficiently in ARIMA(p, d, q) modelsdetect_arima fastcpd.arima fastcpd_arima
Find change points efficiently in ARMA(p, q) modelsdetect_arma fastcpd.arma fastcpd_arma
Find change points efficiently in logistic regression modelsdetect_binomial detect_logistic_regression fastcpd.binomial fastcpd_binomial
Find change points efficiently in exponentially distributed datadetect_exponential fastcpd.exponential fastcpd_exponential
Family-specific change point detectiondetect_family fastcpd.family fastcpd_family
Find change points efficiently in GARCH(p, q) modelsdetect_garch fastcpd.garch fastcpd_garch
Find change points efficiently via kernel change point detectiondetect_kcp detect_kernel fastcpd.kcp fastcpd_kcp
Find change points efficiently in penalized linear regression modelsdetect_lasso fastcpd.lasso fastcpd_lasso
Find change points efficiently in linear regression modelsdetect_linear_regression detect_lm fastcpd.lm fastcpd_lm
Find change points efficiently in mean change modelsdetect_mean fastcpd.mean fastcpd_mean
Find change points efficiently in mean variance change modelsdetect_meanvariance detect_mean_variance fastcpd.meanvariance fastcpd.mv fastcpd_meanvariance fastcpd_mv
Find change points efficiently in Poisson regression modelsdetect_poisson detect_poisson_regression fastcpd.poisson fastcpd_poisson
Find change points efficiently in quantile regression modelsdetect_quantile detect_quantile_regression fastcpd.quantile fastcpd_quantile
Find change points efficiently via rank-based change point detectiondetect_rank fastcpd.rank fastcpd_rank
Find change points efficiently in VAR(p) modelsdetect_var fastcpd.var fastcpd_var
Find change points efficiently in variance change modelsdetect_variance fastcpd.variance fastcpd_variance
Estimate variance for change point modelsestimate_variance
Variance estimation for ARMA model with change pointsestimate_variance_arma variance.arma variance_arma
Variance estimation for linear models with change pointsestimate_variance_linear_regression estimate_variance_lm variance.lm variance_lm
Variance estimation for mean change modelsestimate_variance_mean variance.mean variance_mean
Variance estimation for median change modelsestimate_variance_median variance.median variance_median
An S4 class to store the output created with 'detect()'fastcpd-class
Occupancy Detection Data Setoccupancy
Plot the data and the change points for a fastcpd objectplot,fastcpd,missing-method plot.fastcpd
Plot confidence intervals for a fastcpd objectplot.fastcpd_confint
Print the call and the change points for a fastcpd objectprint,fastcpd-method print.fastcpd
Show the available methods for a fastcpd objectshow,fastcpd-method show.fastcpd
Show the summary of a fastcpd objectsummary,fastcpd-method summary.fastcpd
Transcription Profiling of 57 Human Bladder Carcinoma Samplestranscriptome
UK Seatbelts Datauk_seatbelts
Well-log Dataset from Numerical Bayesian Methods Applied to Signal Processingwell_log