The statesegmentation package contains the implementation of a a greedy search algorithm (GSBS) to segment a timeseries into states with stable activity patterns.
You can find more information about the method here: Geerligs L., van Gerven M., Güçlü U (2020) Detecting neural state transitions underlying event segmentation biorXiv. https://doi.org/10.1101/2020.04.30.069989
The package can be installed using: pip install statesegmentation
An example use case can be found in the examples directory.