Automated multi-feature segmentation of treadmill running


seg1d is an open-source Python package for the automated segmentation of one-dimensional data using one or more reference segments. The segmentation process allows users to apply various methods and parameters for the process through weighted features (i.e., additional data attributed to the same set) in a rolling correlation size-varying window of a reference(s) to a target. Correlations can be averaged across the references and a peak detection algorithm finds the most prominent segments. Non-overlapping segments are identified and a clustering algorithm groups the most similar segments within the target. The package was developed for movement sciences but should be useful to anyone interested in extracting correlated subsequences from a dataset.

Fig. 1: Algorithm Architecture

There are three main phases of the segmentation algorithm. First the data is processed for features, next these datasets are compared with a rolling correlation, and last, the aggregated correlations are clustered to determine the best candidates. 

Fig. 2: Clustering

We cluster the aggregated correlations to find groupings most similar to desired motion