Registry / ai-ml / changepy

changepy

JSON →
library0.4.0pypypi✓ verified 88d ago

Changepoint detection on time series in Python. Version 0.4.0 provides algorithms like PELT and binary segmentation for detecting shifts in mean and variance. Low release cadence; last release in 2020.

pip install changepy
INSTALL
IMPORT
SIG · CHANGEPY
C
changepy
ai-mlpythonv0.4.0
Install
3.6s avg
Import
254ms
Disk
89MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.4.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.236s · 89.4MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 3.6s · import 0.272s · 86MB
89MB installed
● package 89MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pelt
✓ from changepy import pelt
binseg
✓ from changepy import binseg

Basic usage of PELT changepoint detection on a synthetic time series.

import numpy as np from changepy import pelt # Generate example time series with one changepoint np.random.seed(42) ts = np.concatenate([np.random.normal(0, 1, 50), np.random.normal(5, 1, 50)]) # Detect changepoints changepoints = pelt(ts, penalty=2*np.log(len(ts))) print(changepoints) # Expected: [49] (0-indexed), typically
Debug
Known issues
gotchaThe PELT implementation expects data to be an array-like of floats. Passing integer arrays may cause type errors.
fix
Convert your data to float: arr = np.array(data, dtype=float).
affects: all
deprecatedNo active development since 2020; consider using ruptures for maintained changepoint detection.
fix
Switch to ruptures (pip install ruptures) for more algorithms and active maintenance.
affects: >=0.4.0
Errors
Common errors & fixes
ImportError: cannot import name 'pelt' from 'changepy'
Outdated or incorrect installation; package may not be installed correctly.
fix
Ensure changepy is installed: pip install --upgrade changepy
ValueError: The model must be one of 'mean', 'var', or 'meanvar'.
Using an invalid model argument in pelt() or binseg().
fix
Use one of the allowed string values: 'mean', 'var', or 'meanvar'.
Upgrade
Version history
0.4.0latest on PyPI · released Dec 6, 2023
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
16
Amazon
1
OpenAI (training)
1
Resources
changepy — pip install changepy · libregistry