More efficient than PELT for certain data types by maintaining
piecewise quadratic cost functions instead of just minimum values.
Achieves O(n) complexity in practice.
Average candidates per time point (efficiency metric)
Arguments
data
Numeric vector of observations
penalty
Penalty for adding a changepoint. Can be:
"bic": log(n)
"aic": 2
"mbic": 3*log(n)
numeric: Custom penalty value
min_segment
Minimum segment length (default: 2)
cost_type
Type of cost function:
"mean": Gaussian mean change (default)
"meanvar": Gaussian mean and variance change
"poisson": Poisson rate change
References
Maidstone, R., Hocking, T., Rigaill, G., and Fearnhead, P. (2017).
On optimal multiple changepoint algorithms for large data.
Statistics and Computing, 27(2), 519-533.