Sktime-compatible change and anomaly detection
Project description
skchange
skchange
provides sktime-compatible change detection and changepoint-based anomaly detection algorithms.
Experimental but maturing.
Documentation
Now available.
Installation
pip install skchange
Requires Python >= 3.9, < 3.13.
Quickstart
Changepoint detection / time series segmentation
from skchange.change_detectors.moscore import Moscore
from skchange.datasets.generate import generate_alternating_data
df = generate_alternating_data(n_segments=10, segment_length=50, mean=5, random_state=1)
detector = Moscore(bandwidth=10)
detector.fit_predict(df)
0 49
1 99
2 149
3 199
4 249
5 299
6 349
7 399
8 449
Name: changepoint, dtype: int64
Multivariate anomaly detection
import numpy as np
from skchange.anomaly_detectors import Mvcapa
from skchange.datasets.generate import generate_anomalous_data
n = 300
anomalies = [(100, 119), (250, 299)]
means = [[8.0, 0.0, 0.0], [2.0, 3.0, 5.0]]
df = generate_anomalous_data(n, anomalies, means, random_state=3)
detector = Mvcapa()
detector.fit_predict(df)
anomaly_interval anomaly_columns
0 [100, 119] [0]
1 [250, 299] [2, 1, 0]
License
skchange
is a free and open-source software licensed under the BSD 3-clause license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
skchange-0.8.1.tar.gz
(3.9 MB
view details)
Built Distribution
File details
Details for the file skchange-0.8.1.tar.gz
.
File metadata
- Download URL: skchange-0.8.1.tar.gz
- Upload date:
- Size: 3.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 791d1d66a4ab627991f5ff885de0e9b344a9d6cc12db53f590871b0d4bffad78 |
|
MD5 | 15bbdb453fde91ab9de421704646344e |
|
BLAKE2b-256 | 9dc841b8f6ac7888ff5837ef7d5ba84db22e4222d4090a228e1e8af16d7e72f7 |
File details
Details for the file skchange-0.8.1-py3-none-any.whl
.
File metadata
- Download URL: skchange-0.8.1-py3-none-any.whl
- Upload date:
- Size: 4.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f089bc3d450fa32afd6b7a0e1d6323f6cc8d56b61bbd0827f00a31533eb79811 |
|
MD5 | ccd050db2e58687b1b451b660765341c |
|
BLAKE2b-256 | b7a689dcc4942d0268bcc717dc751ce75e6115ba1151a45cc7fd85262e6af64a |