Skip to contents

Core API

cpt_detect()
Unified changepoint detection dispatcher
cpt_methods()
Introspect available changepoint detection methods
cpt_penalty()
Construct changepoint penalties
cpt_cite()
Cite the method behind a result
as_cpt_series()
Coerce a time series object to values plus a time index
new_ggcpt()
Create a ggcpt object
is_ggcpt()
Test if an object is a ggcpt object
print(<ggcpt>)
Print a ggcpt object

Extending the package

Bring a detector this package does not wrap – a non-CRAN engine, a Python tool, a neural detector, or your own changepoints – into the same tidy, plottable grammar.

as_ggcpt()
Turn external changepoints into a ggcpt result
cpt_register_method() cpt_unregister_method() cpt_registered_methods()
Register an external changepoint detector
cpt_install_engines()
Install the engines behind a family of methods

Original wrappers

cpt_wrapper()
Changepoint wrapper
ecp_wrapper()
ecp wrapper

Search and pruning wrappers

fpop_wrapper()
FPOP wrapper — Functional Pruning Optimal Partitioning
wbs_wrapper()
WBS wrapper — Wild Binary Segmentation
wbs2_wrapper()
WBS2 wrapper — Wild Binary Segmentation 2
not_wrapper()
NOT wrapper — Narrowest-Over-Threshold
mosum_wrapper()
MOSUM wrapper — Moving Sum
idetect_wrapper()
Isolate-Detect wrapper
tguh_wrapper()
TGUH wrapper

Inference and slope wrappers

smuce_wrapper()
SMUCE / HSMUCE wrapper — multiscale changepoint inference
cpop_wrapper()
CPOP wrapper — optimal change-in-slope detection
nsp_wrapper()
NSP wrapper — Narrowest Significance Pursuit
cpt_crops() autoplot(<ggcpt_path>) print(<ggcpt_path>) tidy(<ggcpt_path>)
CROPS — the full penalty path of a penalised changepoint method

Inference

Where could this changepoint be, and is it real?

cpt_confint()
Confidence intervals for changepoint locations
cpt_test()
Test detected changepoints
cpt_regions()
Tidy the significance regions of a ggcpt object

Choosing the number of changepoints

Diagnostics

Which observation is driving this, which setting, and what did the detector actually compute?

cpt_influence() print(<ggcpt_influence>) autoplot(<ggcpt_influence>) tidy(<ggcpt_influence>)
Influence diagnostics for a changepoint segmentation
cpt_leverage()
Rank observations by influence
cpt_sensitivity() print(<ggcpt_sensitivity>) tidy(<ggcpt_sensitivity>) autoplot(<ggcpt_sensitivity>)
Sensitivity of a segmentation to its tuning parameters
cpt_statistic() ggcpt_statistic()
The detector's statistic as a function of location
cpt_solution_path() ggcpt_solution_path()
The solution path of a search-based detector
cpt_scale_space() ggcpt_scale_space()
Scale space: the statistic across bandwidths

Supervised detection

Labelled regions as ground truth, label errors as the accuracy measure, and a learned penalty.

cpt_labels()
Changepoint labels
as_cpt_labels()
Coerce annotations to changepoint labels
cpt_label_error() tidy(<cpt_label_error>) print(<cpt_label_error>)
Score a segmentation against labels
cpt_label_error_curve() print(<ggcpt_label_curve>) autoplot(<ggcpt_label_curve>)
Label error as a function of the penalty
cpt_learn_penalty() print(<ggcpt_penalty_model>) coef(<ggcpt_penalty_model>) predict(<ggcpt_penalty_model>)
Learn a penalty from labelled series

Choosing and combining methods

Communication

cpt_annotate_events() print(<ggcpt_events>) tidy(<ggcpt_events>) autoplot(<ggcpt_events>)
Match detected changepoints to known events
cpt_report()
A reproducible report of a changepoint analysis
cpt_gt()
A publication-ready changepoint table

Benchmarking

cpt_benchmark() print(<ggcpt_benchmark>) tidy(<ggcpt_benchmark>) autoplot(<ggcpt_benchmark>)
Benchmark detectors across datasets
cpt_datasets()
A catalogue of benchmark datasets
cpt_load_tcpd()
Download and cache the Turing Change Point Dataset
cpt_annotations()
Per-annotator ground truth for a benchmark dataset

Streaming and online monitoring

cpt_monitor() tidy(<ggcpt_monitor>) print(<ggcpt_monitor>) autoplot(<ggcpt_monitor>)
A stateful sequential changepoint monitor
cpt_update()
Feed observations to a monitor
alarms()
The alarm log of a monitor
cpt_replay()
Replay a series through a sequential detector
cpt_delay() tidy(<ggcpt_delay>) glance(<ggcpt_delay>) print(<ggcpt_delay>) autoplot(<ggcpt_delay>)
Detection delay and false-alarm rate

Power and study design

cpt_power() tidy(<ggcpt_power>) print(<ggcpt_power>) autoplot(<ggcpt_power>)
Detection power for a changepoint scenario
cpt_min_detectable() print(<ggcpt_min_detectable>)
The smallest detectable change
cpt_scenarios()
A grid of simulation scenarios

Bayesian wrappers

bcp_wrapper()
Bayesian changepoint wrapper (Barry-Hartigan product partition model)
bocpd_wrapper()
Bayesian online changepoint detection wrapper (BOCPD)
beast_wrapper()
BEAST wrapper — Bayesian estimation of abrupt change, seasonality, and trend

Nonparametric and sequential wrappers

cpm_wrapper()
Sequential change point model wrapper (CPM)
kcp_wrapper()
Kernel changepoint wrapper (KCP on running statistics)
npmojo_wrapper()
Nonparametric MOSUM wrapper (NP-MOJO)
sn_wrapper()
Self-normalisation wrapper (SNSeg)

Robust and model-selection wrappers

decafs_wrapper()
DeCAFS wrapper — changes amid drift and autocorrelated noise
envcpt_wrapper()
EnvCpt wrapper — changepoints versus trends versus autocorrelation
fastcpd_wrapper()
fastcpd wrapper — fast changepoint detection via sequential gradient descent

Multivariate and high-dimensional wrappers

inspect_wrapper()
inspect wrapper — high-dimensional changepoints via sparse projection
ocd_wrapper()
ocd wrapper — online high-dimensional changepoint detection
geomcp_wrapper()
Geometrically-inspired multivariate changepoint wrapper (geomcp)
esac_wrapper()
ESAC wrapper — sparsity-adaptive high-dimensional detection
pilliat_wrapper()
Pilliat wrapper — high-dimensional detection by three complementary tests
hdcov_wrapper()
High-dimensional covariance changepoints
network_wrapper()
Dynamic-network changepoints
var_wrapper()
VAR(1) changepoints
hdreg_wrapper()
High-dimensional regression changepoints

Functional and network wrappers

fmean_wrapper()
Functional mean changepoints
fcov_wrapper()
Functional covariance changepoints
kwc_wrapper()
Robust depth-based changepoints for functional and multivariate data
fabisearch_wrapper()
Network-structure changepoints via non-negative matrix factorisation

Regression-break wrappers

strucchange_wrapper()
Bai-Perron structural break wrapper (strucchange)
segmented_wrapper()
Broken-line regression wrapper (segmented)
bfast_wrapper()
BFAST wrapper — breaks for additive season and trend

Applied vocabularies and fast paths

trend_wrapper()
Classical single-changepoint tests (Pettitt, Buishand, SNHT)
taylor_wrapper()
Taylor's change point analyzer
wbsts_wrapper()
WBS for nonstationary time series
binsegrcpp_wrapper()
Fast binary segmentation across loss functions

Bayesian formula models

mcp_wrapper()
Bayesian formula-based changepoint regression (mcp)

broom methods

tidy(<ggcpt>)
Tidy a ggcpt object
glance(<ggcpt>)
Glance at a ggcpt object
augment(<ggcpt>)
Augment a ggcpt object
summary(<ggcpt>) print(<summary.ggcpt>)
Summary of a ggcpt object

Additional S3 methods

Theming, palettes and accessibility

theme_ggcpt()
ggchangepoint theme
annotate_segments()
Annotate segments with alternating shading
scale_colour_cpt() scale_color_cpt() scale_fill_cpt() scale_linetype_cpt()
Colour-vision-safe scales for changepoint methods
scale_fill_cpt_label() scale_colour_cpt_label()
Colour scales for changepoint labels and label errors

Visualization

autoplot(<ggcpt>)
Autoplot a ggcpt object
ggcptplot()
Plot for the changepoint package
ggecpplot()
Plot for the ecp package
geom_changepoint()
Changepoint vertical rules geom
geom_cpt_segment()
Changepoint segment level geom
geom_cpt_ci()
Changepoint confidence interval geom
geom_cpt_region()
Significance region geom
geom_cpt_label()
Changepoint label geom
geom_cpt_event()
Event annotation geom
stat_changepoint()
Changepoint detection stat
ggcpt_posterior()
Posterior probability plot for Bayesian results
ggcpt_runlength()
Run-length posterior heatmap for Bayesian online results
ggcpt_interactive()
Interactive changepoint plot

Method comparison, batch, and stability

ggcpt_compare()
Compare multiple changepoint detection methods
ggcpt_compare_table()
Comparison table
cpt_batch() print(<ggcpt_batch>) tidy(<ggcpt_batch>) autoplot(<ggcpt_batch>)
Batch changepoint detection over many series
cpt_stability() print(<ggcpt_stability>) autoplot(<ggcpt_stability>)
Changepoint stability diagnostics via bootstrap

Evaluation

cpt_metrics()
Changepoint accuracy metrics
cpt_metrics_annotated()
Multi-annotator evaluation
ggcpt_eval()
Evaluation visualization

Simulation and data

cpt_simulate() rcpt()
Generate simulated changepoint data
signal_blocks()
Blocks test signal
signal_fms()
FMS (Four-Metric-Segments) test signal
signal_mix()
Mix test signal
signal_teeth()
Teeth test signal
signal_stairs()
Stairs test signal

Re-exports

reexports tidy glance augment autoplot as_tibble
Objects exported from other packages