segment_pelt | R Documentation |
Segmenting functions for the PELT algorithm
segment_pelt(x, model_fn = fit_meanvar, ...)
x |
A time series |
model_fn |
A |
... |
arguments passed to |
This function wraps either changepoint::cpt.meanvar()
or
changepoint::cpt.mean()
.
A cpt
object returned by changepoint::cpt.meanvar()
or
changepoint::cpt.mean()
# Segment a time series using PELT
res <- segment_pelt(DataCPSim)
res
str(res)
# Segment as time series while specifying a penalty function
segment_pelt(DataCPSim, penalty = "BIC")
# Segment a time series while specifying a meanshift normal model
segment_pelt(DataCPSim, model_fn = fit_meanshift_norm, penalty = "BIC")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.