powered by
Retrieve the indices of the changepoints identified by an algorithm or model.
changepoints(x, ...)# S3 method for default changepoints(x, ...)# S3 method for mod_cpt changepoints(x, ...)# S3 method for seg_basket changepoints(x, ...)# S3 method for seg_cpt changepoints(x, ...)# S3 method for tidycpt changepoints(x, use_labels = FALSE, ...)# S3 method for ga changepoints(x, ...)# S3 method for cpt changepoints(x, ...)# S3 method for wbs changepoints(x, ...)
# S3 method for default changepoints(x, ...)
# S3 method for mod_cpt changepoints(x, ...)
# S3 method for seg_basket changepoints(x, ...)
# S3 method for seg_cpt changepoints(x, ...)
# S3 method for tidycpt changepoints(x, use_labels = FALSE, ...)
# S3 method for ga changepoints(x, ...)
# S3 method for cpt changepoints(x, ...)
# S3 method for wbs changepoints(x, ...)
a numeric vector of changepoint indices, or, if use_labels is TRUE, a character of time labels.
use_labels
TRUE
character
A tidycpt, segmenter, or mod_cpt object
segmenter
arguments passed to methods
return the time labels for the changepoints instead of the indices.
tidycpt objects, as well as their segmenter and model components, implement changepoints() methods.
model
changepoints()
Note that this function is not to be confused with wbs::changepoints(), which returns different information.
wbs::changepoints()
For the default method, changepoints() will attempt to return the cpt_true attribute, which is set by test_set().
default
cpt_true
test_set()
Other tidycpt-generics: as.model(), as.segmenter(), diagnose(), fitness(), model_name()
as.model()
as.segmenter()
diagnose()
fitness()
model_name()
cpts <- segment(DataCPSim, method = "ga", maxiter = 5) changepoints(cpts$segmenter) cpts <- segment(DataCPSim, method = "wbs") changepoints(cpts$segmenter)
Run the code above in your browser using DataLab