| cpt_label_error | R Documentation |
Counts label errors: a positive region with no changepoint is a false
negative, a negative region with one is a false positive, and a
"one_change" region with two or more is a false positive as well.
This is the accuracy measure supervised changepoint detection is built on,
and, unlike an information criterion, it is defined by what the expert
asserted rather than by a model assumption.
cpt_label_error(object, labels)
## S3 method for class 'cpt_label_error'
tidy(x, ...)
## S3 method for class 'cpt_label_error'
print(x, ...)
object |
A |
labels |
A |
x |
A |
... |
Ignored. |
A tibble with one row per label: label_id,
series (the label set's series identifier, NA for a
single unnamed series), start, end, change,
n_changes (how many detections fell inside), status ("correct", "false_positive" or
"false_negative"), carrying the totals in an errors
attribute and printing them. An empty label set gives a zero-row
tibble with the same columns.
cpt_labels(),
cpt_label_error_curve(), geom_cpt_label().
set.seed(2026)
fit <- cpt_detect(c(rnorm(50), rnorm(50, 4)), method = "pelt")
labs <- cpt_labels(c(40, 70), c(60, 95), c("one_change", "no_change"))
cpt_label_error(fit, labs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.