Package: ggchangepoint 0.6.0

ggchangepoint: Combines Changepoint Analysis with 'ggplot2'

A unified, tidy, 'ggplot2'-native interface to changepoint detection in R. A 'cpt_detect()' dispatcher covers fifty methods (penalised and optimal partitioning, multiscale and search methods, nonparametric and kernel methods, Bayesian methods, high-dimensional, functional, covariance and network methods, regression breaks through a formula interface, seasonal-trend decomposition and the classical single-change tests), with distribution families for counts, binary outcomes and waiting times, missing-value handling, grouped data, and constraints on locations and segment lengths. Every result is the same 'ggcpt' object, in one verified location convention, with 'broom'-style tidy/glance/augment methods, 'autoplot()' and composable 'ggproto' layers. Around detection: effect sizes, a test for a change at a date fixed in advance, tests for a change anywhere, confidence intervals, post-detection tests, selection of the number of changes, assumption checks and goodness of fit, robustness to the noise model, stability, consensus and influence diagnostics, supervised detection, sequential monitoring, power and study design, benchmarks, reports and an export under a documented 'JSON' schema. What each engine does (its runtime, whether its answer survives a change of units or a reversal of time, its false positives by noise regime and data type, its false alarms on pure noise) and the calibration of the package's own intervals and tests are measured and shipped as data, and 'cpt_recommend()' chooses from those measurements. 'cpt_register_method()' brings external and non-CRAN detectors into the same grammar.

Authors:Youzhi Yu [aut, cre]

ggchangepoint_0.6.0.tar.gz
ggchangepoint_0.6.0.zip(r-4.7-any)ggchangepoint_0.6.0.zip(r-4.6-any)ggchangepoint_0.6.0.zip(r-4.5-any)
ggchangepoint_0.6.0.tgz(r-4.6-any)ggchangepoint_0.6.0.tgz(r-4.5-any)
ggchangepoint_0.6.0.tar.gz(r-4.7-any)ggchangepoint_0.6.0.tar.gz(r-4.6-any)
ggchangepoint_0.6.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
ggchangepoint/json (API)

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

Bug tracker:https://github.com/pursuitofdatascience/ggchangepoint/issues

Pkgdown/docs site:https://pursuitofdatascience.github.io

Datasets:

On CRAN:

Conda:

changepointchangepoint-detectiondatavizggplot2

6.62 score 3 stars 36 scripts 640 downloads 153 exports 33 dependencies

Last updated from:a061401765. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK981
source / vignettesOK1818
linux-releaseOK1176
macos-releaseOK1145
macos-oldrelOK1144
windows-develOK598
windows-releaseOK695
windows-oldrelOK620
wasm-releaseOK1011

Exports:alarmsannotate_segmentsas_cpt_labelsas_cpt_seriesas_ggcptas_jsonas_tibbleaugmentautoplotbcp_wrapperbeast_wrapperbfast_wrapperbinsegrcpp_wrapperbocpd_wrappercpm_wrappercpop_wrappercpt_annotate_eventscpt_annotationscpt_assumptionscpt_attribute_eventcpt_batchcpt_benchmarkcpt_citecpt_confintcpt_consensuscpt_cropscpt_datasetscpt_delaycpt_detectcpt_effectcpt_exportcpt_familiescpt_gofcpt_gtcpt_importcpt_influencecpt_install_enginescpt_label_errorcpt_label_error_curvecpt_labelscpt_learn_penaltycpt_leveragecpt_load_tcpdcpt_methodscpt_metricscpt_metrics_annotatedcpt_min_detectablecpt_monitorcpt_null_powercpt_penaltycpt_powercpt_recommendcpt_regionscpt_register_methodcpt_registered_methodscpt_replaycpt_reportcpt_robustnesscpt_scale_spacecpt_scenarioscpt_segment_modelscpt_selectcpt_sensitivitycpt_simulatecpt_solution_pathcpt_stabilitycpt_statisticcpt_testcpt_test_atcpt_test_nullcpt_unregister_methodcpt_updatecpt_verifycpt_wrapperdecafs_wrapperecp_wrapperenvcpt_wrapperesac_wrapperfabisearch_wrapperfastcpd_wrapperfcov_wrapperfmean_wrapperfpop_wrappergeom_changepointgeom_cpt_cigeom_cpt_eventgeom_cpt_labelgeom_cpt_regiongeom_cpt_segmentGeomChangepointgeomcp_wrapperGeomCptCiGeomCptEventGeomCptLabelGeomCptRegionGeomCptSegmentggcpt_compareggcpt_compare_tableggcpt_evalggcpt_interactiveggcpt_posteriorggcpt_runlengthggcpt_scale_spaceggcpt_solution_pathggcpt_statisticggcptplotggecpplotglancehdcov_wrapperhdreg_wrapperidetect_wrapperinspect_wrapperis_ggcptkcp_wrapperkwc_wrappermcp_wrappermosum_wrappernetwork_wrappernew_ggcptnot_wrappernpmojo_wrappernsp_wrapperocd_wrapperpilliat_wrapperrcptscale_color_cptscale_colour_cptscale_colour_cpt_labelscale_fill_cptscale_fill_cpt_labelscale_linetype_cptsegmented_wrappersignal_blockssignal_fmssignal_mixsignal_stairssignal_teethsmuce_wrappersn_wrapperstat_changepointstat_cpt_regionStatChangepointStatCptRegionstrucchange_wrappertaylor_wrappertguh_wrappertheme_ggcpttidytrend_wrappervar_wrapperwbs_wrapperwbs2_wrapperwbsts_wrapper

Dependencies:changepointchangepoint.npclicpp11dplyrecpfarvergenericsggplot2gluegtableisobandlabelinglatticelifecyclemagrittrpillarpkgconfigR6rbibutilsRColorBrewerRcppRdpackrlangS7scalestibbletidyselectutf8vctrsviridisLitewithrzoo

ggchangepoint: A Unified Tidy Interface for Changepoint Analysis in R
Abstract | Introduction | The changepoint problem | Penalised cost minimisation | Search-based and multiscale methods | Beyond the mean | Design of the package | The ggcpt result contract | Tidy methods and the plotting layer | Design principles | The unified dispatcher | A tour of the method families | Penalised and optimal partitioning | Multiscale and search methods | Changes in slope | Bayesian detection | Nonparametric and sequential detection | Robustness to drift, autocorrelation, and model ambiguity | Multivariate and high-dimensional detection | Structural breaks in regression | Beyond detection | Batch detection over many series | Stability diagnostics | Evaluation, interactivity, and citations | Discussion | Acknowledgements | References

Last update: 2026-09-26
Started: 2022-02-21

Comparing and Evaluating Changepoint Methods with ggchangepoint
Abstract | Introduction | Problem setup | Visual comparison | Accuracy metrics | Multi-annotator evaluation | Visual evaluation | Uncertainty beyond point sets | Engine-native confidence intervals | Bootstrap stability | Penalty-path sensitivity: CROPS | A benchmarking workflow | Discussion | References

Last update: 2026-09-26
Started: 2026-06-20

Extending ggchangepoint
as_ggcpt(): changepoints in, result out | cpt_register_method(): dispatch by name | Returning a finished result | Recipe: a Python detector through reticulate | Reducing the install | What the contract is | References

Last update: 2026-09-24
Started: 2026-08-29

Inference, Selection and Diagnostics
1. Where could the changepoint be? | Four provenances, one contract | A changepoint that is an interval | 2. Is the change real? | 3. How many changepoints? | 4. What is driving the answer? | Which observation | Which setting | What the detector computed | Putting it together | References

Last update: 2026-09-24
Started: 2026-08-29

Streaming and Online Monitoring
1. A monitor, one batch at a time | 2. Scoring: delay, not location | 3. Replaying a finished series | 4. The three methods | edetector: the default, governed by alpha | cpm: governed by arl0 | alpha and arl0 are alternative parameterisations, not two knobs | ocd: multivariate only | 5. Delay is a function of shift size | 6. Assumptions: the thresholds are for independent observations | 7. What to report | References

Last update: 2026-09-24
Started: 2026-08-30

Supervised Changepoint Detection
Labels | Scoring a segmentation | The label error curve | Learning the penalty | Where this fits | References

Last update: 2026-09-24
Started: 2026-08-29

The ggchangepoint Feature Tour: A Complete Map of the Package Surface
Abstract | The result object and its methods | Unified detection | Engine wrappers | The classical core (0.1.0) | The search and pruning wave (0.2.0) | The engine wave (0.4.0) | The penalty path | The visualisation layer | Comparing methods | Batch detection and stability | Evaluation against ground truth | Simulation and canonical signals | Citing the methodology | The 0.5.0 surface | Time indices | Inference | Selecting the number of changepoints | Diagnostics | Supervised detection | Choosing and combining methods | Communication | Benchmarking | Streaming | Power and study design | Extending | Closing note | References

Last update: 2026-09-24
Started: 2026-06-25

Readme and manuals

Help Manual

Help pageTopics
The alarm log of a monitoralarms alarms.ggcpt_monitor
Annotate segments with alternating shadingannotate_segments
Coerce annotations to changepoint labelsas_cpt_labels
Coerce a time series object to values plus a time indexas_cpt_series
Turn external changepoints into a ggcpt resultas_ggcpt
Convert a result to JSONas_json as_json.default as_json.ggcpt
Augment a ggcpt objectaugment.ggcpt
Autoplot a ggcpt objectautoplot.ggcpt
Bayesian changepoint wrapper (Barry-Hartigan product partition model)bcp_wrapper
BEAST wrapper: Bayesian estimation of abrupt change, seasonality, and trendbeast_wrapper
BFAST wrapper: breaks for additive season and trendbfast_wrapper
Fast binary segmentation across loss functionsbinsegrcpp_wrapper
Bayesian online changepoint detection wrapper (BOCPD)bocpd_wrapper
Sequential change point model wrapper (CPM)cpm_wrapper
CPOP wrapper: optimal change-in-slope detectioncpop_wrapper
Match detected changepoints to known eventsautoplot.ggcpt_events cpt_annotate_events print.ggcpt_events tidy.ggcpt_events
Per-annotator ground truth for a benchmark datasetcpt_annotations
Check the assumptions behind a segmentationcpt_assumptions print.ggcpt_assumptions tidy.ggcpt_assumptions
Was a detected change the event you have in mind?cpt_attribute_event
Batch changepoint detection over many seriesautoplot.ggcpt_batch cpt_batch print.ggcpt_batch tidy.ggcpt_batch
Benchmark detectors across datasetsautoplot.ggcpt_benchmark cpt_benchmark print.ggcpt_benchmark tidy.ggcpt_benchmark
What the package promises, against what it deliverscpt_calibration
Cite the method behind a resultcpt_cite
Confidence intervals for changepoint locationscpt_confint
Consensus changepoints across several detectorsautoplot.ggcpt_consensus cpt_consensus print.ggcpt_consensus
CROPS: the full penalty path of a penalised changepoint methodautoplot.ggcpt_path cpt_crops print.ggcpt_path tidy.ggcpt_path
False positives and power by data typecpt_data_types
A catalogue of benchmark datasetscpt_datasets
Detection delay and false-alarm rateautoplot.ggcpt_delay cpt_delay glance.ggcpt_delay print.ggcpt_delay tidy.ggcpt_delay
Unified changepoint detection dispatchercpt_detect
Effect size at each changepointautoplot.ggcpt_effect cpt_effect print.ggcpt_effect tidy.ggcpt_effect
Write a result to a file, and read it backcpt_export cpt_import
Distribution families, and what each request runscpt_families
Goodness of fit, segment by segmentcpt_gof print.ggcpt_gof tidy.ggcpt_gof
A publication-ready changepoint tablecpt_gt
Influence diagnostics for a changepoint segmentationautoplot.ggcpt_influence cpt_influence print.ggcpt_influence tidy.ggcpt_influence
Install the engines behind a family of methodscpt_install_engines
Invariances of every engine's answercpt_invariances
Score a segmentation against labelscpt_label_error print.cpt_label_error tidy.cpt_label_error
Label error as a function of the penaltyautoplot.ggcpt_label_curve cpt_label_error_curve print.ggcpt_label_curve tidy.ggcpt_label_curve
Changepoint labelscpt_labels tidy.cpt_labels
Learn a penalty from labelled seriescoef.ggcpt_penalty_model cpt_learn_penalty predict.ggcpt_penalty_model print.ggcpt_penalty_model tidy.ggcpt_penalty_model
Rank observations by influencecpt_leverage
Download and cache the Turing Change Point Datasetcpt_load_tcpd
Introspect available changepoint detection methodscpt_methods
Changepoint accuracy metricscpt_metrics
Multi-annotator evaluationcpt_metrics_annotated
The smallest detectable changecpt_min_detectable print.ggcpt_min_detectable tidy.ggcpt_min_detectable
A stateful sequential changepoint monitorautoplot.ggcpt_monitor cpt_monitor print.ggcpt_monitor tidy.ggcpt_monitor
False positives and power under four noise regimescpt_noise_benchmark
What an empty answer could have detectedcpt_null_power print.ggcpt_null_power tidy.ggcpt_null_power
False alarms on pure noise at scalecpt_null_sizes
Construct changepoint penaltiescpt_penalty
Detection power for a changepoint scenarioautoplot.ggcpt_power cpt_power print.ggcpt_power tidy.ggcpt_power
Recommend a detection methodautoplot.ggcpt_recommendation cpt_recommend print.ggcpt_recommendation tidy.ggcpt_recommendation
Tidy the significance regions of a ggcpt objectcpt_regions
Register an external changepoint detectorcpt_registered_methods cpt_register_method cpt_unregister_method
Replay a series through a sequential detectorcpt_replay
A reproducible report of a changepoint analysiscpt_report
Does a changepoint survive a change of noise model?autoplot.ggcpt_robustness cpt_robustness print.ggcpt_robustness tidy.ggcpt_robustness
Engine runtimes by series lengthcpt_runtimes
Scale space: the statistic across bandwidthscpt_scale_space ggcpt_scale_space
A grid of simulation scenarioscpt_scenarios
Fit a model to every segment of a segmentationcpt_segment_models glance.ggcpt_segment_models print.ggcpt_segment_models tidy.ggcpt_segment_models
Choose the number of changepointsautoplot.ggcpt_selection cpt_select print.ggcpt_selection tidy.ggcpt_selection
Sensitivity of a segmentation to its tuning parametersautoplot.ggcpt_sensitivity cpt_sensitivity print.ggcpt_sensitivity tidy.ggcpt_sensitivity
Generate simulated changepoint datacpt_simulate rcpt
The solution path of a search-based detectorcpt_solution_path ggcpt_solution_path
Changepoint stability diagnostics via bootstrapautoplot.ggcpt_stability cpt_stability print.ggcpt_stability tidy.ggcpt_stability
The detector's statistic as a function of locationcpt_statistic ggcpt_statistic
Test detected changepointscpt_test
Test for a change at a date fixed in advancecpt_test_at print.ggcpt_test_at tidy.ggcpt_test_at
Test for a change anywhere in a seriescpt_test_null
Feed observations to a monitorcpt_update
Re-run a result against the engines installed nowcpt_verify print.ggcpt_verification tidy.ggcpt_verification
Changepoint wrappercpt_wrapper
DeCAFS wrapper: changes amid drift and autocorrelated noisedecafs_wrapper
ecp wrapperecp_wrapper
EnvCpt wrapper: changepoints versus trends versus autocorrelationenvcpt_wrapper
ESAC wrapper: sparsity-adaptive high-dimensional detectionesac_wrapper
Network-structure changepoints via non-negative matrix factorisationfabisearch_wrapper
fastcpd wrapper: fast changepoint detection via sequential gradient descentfastcpd_wrapper
Functional covariance changepointsfcov_wrapper
Functional mean changepointsfmean_wrapper
FPOP wrapper: Functional Pruning Optimal Partitioningfpop_wrapper
Changepoint vertical rules geomgeom_changepoint
Changepoint confidence interval geomgeom_cpt_ci
Event annotation geomgeom_cpt_event
Changepoint label geomgeom_cpt_label
Significance region geomgeom_cpt_region
Changepoint segment level geomgeom_cpt_segment
Geometrically-inspired multivariate changepoint wrapper (geomcp)geomcp_wrapper
Conditions raised by ggchangepointggchangepoint-conditions ggchangepoint_error ggchangepoint_warning
ggproto objects for the changepoint layersGeomChangepoint GeomCptCi GeomCptEvent GeomCptLabel GeomCptRegion GeomCptSegment ggchangepoint-ggproto StatChangepoint StatCptRegion
Compare multiple changepoint detection methodsggcpt_compare
Comparison tableggcpt_compare_table
Evaluation visualizationggcpt_eval
Interactive changepoint plotggcpt_interactive
Coerce, format, and plot ggcpt objectsas.data.frame.ggcpt as_tibble.ggcpt format.ggcpt ggcpt_methods plot.ggcpt
Base plot() methods for ggchangepoint result objectsggcpt_plot_methods plot.ggcpt_batch plot.ggcpt_benchmark plot.ggcpt_consensus plot.ggcpt_delay plot.ggcpt_effect plot.ggcpt_events plot.ggcpt_influence plot.ggcpt_label_curve plot.ggcpt_monitor plot.ggcpt_path plot.ggcpt_power plot.ggcpt_recommendation plot.ggcpt_robustness plot.ggcpt_selection plot.ggcpt_sensitivity plot.ggcpt_stability
Posterior probability plot for Bayesian resultsggcpt_posterior
Run-length posterior heatmap for Bayesian online resultsggcpt_runlength
Plot for the changepoint packageggcptplot
Plot for the ecp packageggecpplot
Glance at a ggcpt objectglance.ggcpt
High-dimensional covariance changepointshdcov_wrapper
High-dimensional regression changepointshdreg_wrapper
Isolate-Detect wrapperidetect_wrapper
inspect wrapper: high-dimensional changepoints via sparse projectioninspect_wrapper
Test if an object is a ggcpt objectis_ggcpt
Kernel changepoint wrapper (KCP on running statistics)kcp_wrapper
Robust depth-based changepoints for functional and multivariate datakwc_wrapper
Bayesian formula-based changepoint regression (mcp)mcp_wrapper
MOSUM wrapper: Moving Summosum_wrapper
Dynamic-network changepointsnetwork_wrapper
Create a ggcpt objectnew_ggcpt
NOT wrapper: Narrowest-Over-Thresholdnot_wrapper
Nonparametric MOSUM wrapper (NP-MOJO)npmojo_wrapper
NSP wrapper: Narrowest Significance Pursuitnsp_wrapper
ocd wrapper: online high-dimensional changepoint detectionocd_wrapper
Pilliat wrapper: high-dimensional detection by three complementary testspilliat_wrapper
Forecast from a segment of a segmentationpredict.ggcpt
Print a ggcpt objectprint.ggcpt
Colour-vision-safe scales for changepoint methodsscale_color_cpt scale_colour_cpt scale_fill_cpt scale_linetype_cpt
Colour scales for changepoint labels and label errorsscale_colour_cpt_label scale_fill_cpt_label
Broken-line regression wrapper (segmented)segmented_wrapper
Blocks test signalsignal_blocks
FMS (Four-Metric-Segments) test signalsignal_fms
Mix test signalsignal_mix
Stairs test signalsignal_stairs
Teeth test signalsignal_teeth
SMUCE / HSMUCE wrapper: multiscale changepoint inferencesmuce_wrapper
Self-normalisation wrapper (SNSeg)sn_wrapper
Changepoint detection statstat_changepoint
Significance regions computed in the layerstat_cpt_region
Bai-Perron structural break wrapper (strucchange)strucchange_wrapper
Summary of a ggcpt objectprint.summary.ggcpt summary.ggcpt
Taylor's change point analyzertaylor_wrapper
TGUH wrappertguh_wrapper
ggchangepoint themetheme_ggcpt
Tidy a ggcpt objecttidy.ggcpt
Classical single-changepoint tests (Pettitt, Buishand, SNHT)trend_wrapper
VAR(1) changepointsvar_wrapper
WBS wrapper: Wild Binary Segmentationwbs_wrapper
WBS2 wrapper: Wild Binary Segmentation 2wbs2_wrapper
WBS for nonstationary time serieswbsts_wrapper