Builds the tidy label set that the supervised functions consume: one row per labelled region, each asserting how many changepoints that stretch of the series contains.
Usage
cpt_labels(start, end, change = "change", series = NA_character_)
# S3 method for class 'cpt_labels'
tidy(x, ...)Arguments
- start, end
Integer vectors of region boundaries (positions, inclusive).
- change
What the region asserts, recycled to length:
"change"at least one changepoint lies in the region.
"one_change"exactly one does: a stricter label, and the one that makes false positives detectable inside a positive region.
"no_change"none does.
- series
Optional series identifier, for label sets spanning a panel.
- x
A
cpt_labelstibble (fortidy(), which returns it as a plain tibble).- ...
Ignored.
References
Hocking TD, Rigaill G, Vert J, Bach F (2013). “Learning sparse penalties for change-point detection using max margin interval regression.” In Proceedings of the 30th International Conference on Machine Learning, volume 28, 172–180.
See also
cpt_label_error(), geom_cpt_label(),
cpt_learn_penalty(),
as_cpt_labels() to convert a plain changepoint set.
