The classic Donoho-Johnstone blocks test signal with known changepoints.
Value
A tibble with columns index and value. The true_changepoints
attribute contains the known changepoint locations.
References
Donoho, D. L. and Johnstone, I. M. (1994). Ideal spatial adaptation by wavelet shrinkage. Biometrika, 81(3), 425-455.
See also
Other test signals:
cpt_simulate(),
signal_fms(),
signal_mix(),
signal_stairs(),
signal_teeth()
Examples
x <- signal_blocks(seed = 2026)
attr(x, "true_changepoints")
#> [1] 205 266 307 471 512 819 901 1331 1556 1597 1659
# PELT recovers all eleven Donoho-Johnstone jumps
cpt_detect(x$value, method = "pelt")$changepoints$cp
#> [1] 205 266 307 471 512 819 901 1331 1556 1596 1659
