Skip to content

About

An Efficient Algorithm For Exact Segmentation of Large Compositional and Categorical Time Series

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

An Efficient Algorithm For Exact Segmentation of Large Compositional and Categorical Time Series

Python implementation of the algorithm described in (Truong and Runge, 2024)

Python

To install the Python package, run in a terminal

python -m pip install git+https://github.com/deepcharles/compositionaldust.git

Usage

Create a 3D signal with Dirichlet distributed components. The parameter of the Dirichlet distribution is piecewise constant.

from compositionaldust import generate_signal

signal, bkps_true = generate_signal(n_samples=1_000, n_dims=3)

print(f"The true change-points are {bkps_true}.")

We can now use our method to estimate the true change-point positions. The value of penalty controls the number of change-points that will be estimated: large values will detect few changes, and vice-versa.

from compositionaldust import get_bkps

bkps_pred = get_bkps(signal=signal, penalty=1)

print(f"The predicted change-points are {bkps_pred}.")

About

An Efficient Algorithm For Exact Segmentation of Large Compositional and Categorical Time Series

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages