Statistical Signal Processing, Wearable Sensing & Digital Health
Change point detection with prior-informed penalties
PiChange implements a method for detecting multiple change points while incorporating external knowledge about plausible change locations. A time-varying penalty allows prior information to influence segmentation within the PELT dynamic programming framework.
Developed by Jonathon Jacobs and Shanshan Chen.
R package on CRAN · Source code · Methods preprint
Prior locations are soft inputs: they lower the penalty for a nearby change without forcing one to occur. Changes remain possible elsewhere in the series. Users explicitly construct and inspect the penalty before fitting the segmentation.
The package supports Gaussian and zero-adjusted gamma segment models, and prior locations can be specified using observation indices or dates. Prior widths are measured in observation positions.
install.packages("PiChange")
library(PiChange)
set.seed(1)
y <- c(rnorm(40, 0, 0.3), rnorm(40, 2, 0.3))
penalty <- construct_penalty(
n = length(y),
centers = 40,
width = 5,
method = "mbic",
family = "normal"
)
fit <- pi_change(y, penalty, min_seg_len = 10)
changepoints(fit)
plot(fit)
This simulated example follows the package README. For model choices, date-based analyses, and prior-width sensitivity, see vignette("getting-started", package = "PiChange") and the documentation on CRAN.
Prior locations and widths should reflect scientific knowledge. Assess whether conclusions persist over a reasonable range of prior widths.
Jacobs, J. and Chen, S. (2026). Pi-Change: A Prior-Informed Multiple Change Point Detection Algorithm. arXiv preprint, doi:10.48550/arXiv.2605.01003.
For package-specific citation information, use citation("PiChange") in R.