Skip to content

feat: add EDivisive nonparametric change point detection#375

Open
hass-nation wants to merge 2 commits into
deepcharles:masterfrom
hass-nation:feat/edivisive-detection
Open

feat: add EDivisive nonparametric change point detection#375
hass-nation wants to merge 2 commits into
deepcharles:masterfrom
hass-nation:feat/edivisive-detection

Conversation

@hass-nation

Copy link
Copy Markdown

Summary

Adds EDivisive, a new detection algorithm based on the energy-statistic approach of Matteson and James (2014).

  • Algorithm: Recursively selects the segment and split point that maximise the scaled energy divergence Q(t; a, b) between the two resulting sub-segments. A permutation test decides when no further splits are significant.
  • Key parameters: alpha (distance exponent, default 1 = Euclidean; any value in (0, 2] is valid), min_size, n_perms, sig_level.
  • Supports: 1-D and multivariate signals; both n_bkps (fixed count, no permutation test) and permutation-based stopping.
  • No new dependencies: uses scipy.spatial.distance.cdist, already a ruptures dependency.

Reference

Matteson, D. S. and James, N. A. (2014). A Nonparametric Approach for Multiple Change Point Analysis of Multivariate Data. Journal of the American Statistical Association, 109(505), 334-345.

Test plan

  • 21 new tests in tests/test_edivisive.py covering: interface, error handling, detection accuracy (1-D and 5-D), energy statistic properties, alpha variants, permutation test behaviour, min_size constraint.
  • All 656 existing tests pass with zero regressions.

Implements the E-Divisive algorithm (Matteson & James, 2014, JASA
109(505):334-345) as a new `EDivisive` estimator in
`ruptures.detection`.

The algorithm recursively splits the segment with the highest energy
divergence between its two halves, using a permutation test to decide
when to stop. It makes no distributional assumptions and supports
multivariate signals and a tunable distance exponent `alpha`.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added the Type: Feature New Feature label Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Feature New Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant