Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PiChange

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.

Basic use

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.

Reference

Jacobs, J. and Chen, S. (2026). Pi-Change: A Prior-Informed Multiple Change Point Detection Algorithm. https://doi.org/10.48550/arXiv.2605.01003.

About

❗ This is a read-only mirror of the CRAN R package repository. PiChange — Pi-Change: Change Point Detection with Prior-Informed Penalties

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages