Pi-Change is a prior-informed multiple change point detection method. It allows prespecified plausible change point locations to influence detection through a time-varying penalty while retaining the PELT dynamic programming framework.
Users explicitly construct and inspect the prior-informed penalty before fitting the segmentation.
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)
summary(fit)
plot(fit)Supply time rather than n to specify prior locations as dates. Prior widths
are always measured in observation positions. See
vignette("getting-started", package = "PiChange") for model choices,
date-based analyses, and prior-width sensitivity.
Jacobs, J. and Chen, S. (2026). Pi-Change: A Prior-Informed Multiple Change Point Detection Algorithm. https://doi.org/10.48550/arXiv.2605.01003.