Unified tidy changepoint detection with ggplot2 visualisation.
Details
ggchangepoint provides a consistent S3 result class (ggcpt)
for changepoint detection results, broom-style methods
(tidy(), glance(), augment()), ggplot2
integration via autoplot() and composable geoms
(geom_changepoint(), geom_cpt_segment(),
geom_cpt_ci(), geom_cpt_region(), geom_cpt_label(),
geom_cpt_event(), stat_changepoint()), and a unified
dispatcher cpt_detect() that reaches fifty methods.
Detection engines. cpt_detect() dispatches to the methods in
cpt_methods(), across nine families:
Penalised/optimal: PELT, BinSeg, SegNeigh, AMOC (changepoint); FPOP (fpop); fast binary segmentation (binsegRcpp); the CROPS penalty path (
cpt_crops()); fastcpd (fastcpd, incl. AR/ARMA/GARCH); change-in-slope via CPOP (cpop).Multiscale/search: WBS (wbs), WBS2 and TGUH (breakfast), NOT (not), MOSUM incl. multiscale (mosum), Isolate-Detect (IDetect), SMUCE/HSMUCE with confidence intervals (stepR), WBS for nonstationary series (wbsts).
Inference: Narrowest Significance Pursuit (nsp), which returns intervals rather than points.
Nonparametric/kernel: NP (changepoint.np), E-Divisive/E-Agglo (ecp), kernel running statistics (kcpRS), NP-MOJO (CptNonPar), sequential CPM (cpm), self-normalisation (SNSeg), depth ranks (KWCChangepoint).
Bayesian: Barry-Hartigan posterior (bcp), online BOCPD (ocp), BEAST model averaging (Rbeast), formula-based regression with changepoints (mcp).
High-dimensional: sparse projection (InspectChangepoint), online ocd (ocd), geometric mapping (changepoint.geo), sparsity-adaptive ESAC and Pilliat (HDCD), and covariance, network, VAR and high-dimensional-regression changes (changepoints).
Functional and network: functional mean and covariance (fChange), NMF-based network structure (fabisearch).
Regression, trend and season: Bai-Perron breaks with CIs (strucchange), broken-line regression (segmented), changepoints-vs-autocorrelation model selection (EnvCpt), drift+AR robust detection (DeCAFS), BFAST season-and-trend breaks (bfast).
Classical single-change tests: Pettitt, Buishand and SNHT (trend), Taylor's analyzer (ChangePointTaylor).
What surrounds the detectors. Every detector returns a ggcpt
object with a stable tibble(cp, cp_value) contract, optionally
carrying a time index, engine confidence intervals, a fitted signal,
significance regions and diagnostics. Around that:
Inference:
cpt_confint()(four provenances, one contract),cpt_test(),cpt_regions().Choosing K:
cpt_select()(BIC, Zhang-Siegmund mBIC, AIC, CROPS elbow, cross-validation, stability),cpt_crops(),cpt_penalty().Diagnostics:
cpt_influence(),cpt_leverage(),cpt_sensitivity(),cpt_stability(),cpt_statistic(),cpt_solution_path(),cpt_scale_space().Supervised detection:
cpt_labels(),cpt_label_error(),cpt_label_error_curve(),cpt_learn_penalty().Choosing a method:
cpt_recommend(),cpt_consensus(),ggcpt_compare().Evaluation:
cpt_metrics(),cpt_metrics_annotated(),cpt_benchmark(),cpt_datasets(),cpt_load_tcpd().Streaming:
cpt_monitor(),cpt_update(),alarms(),cpt_replay(),cpt_delay().Study design:
cpt_simulate(),cpt_power(),cpt_min_detectable(),cpt_scenarios().Communication:
cpt_annotate_events(),cpt_report(),cpt_gt(),ggcpt_interactive(),cpt_cite().Extension:
as_ggcpt()andcpt_register_method()bring detectors this package does not and cannot depend on into the same grammar.
See also
The entry points, by group:
Detect:
cpt_detect(),cpt_methods(),cpt_register_method().Visualise:
autoplot.ggcpt(),ggcptplot(),ggcpt_compare().Inference and selection:
cpt_confint(),cpt_test(),cpt_select().Choosing and combining methods:
cpt_consensus(),cpt_recommend(),cpt_benchmark().Evaluation:
cpt_metrics().Streaming:
cpt_monitor().Study design:
cpt_simulate(),cpt_power().Communication:
cpt_report().
Useful links:
Author
Maintainer: Youzhi Yu yuyouzhi666@icloud.com
