# tsflex: flexible time series processing & feature extraction

arXiv: https://arxiv.org/abs/2111.12429 · HTML: https://mlsanity.com/paper/2111.12429/

## Key facts

- Cited by 8 papers in the map (data through 14 Oct 2026).
- Builds on 2 of its 23 references that are in the map.
- First posted on arXiv 24 Nov 2021.

## Builds on (most cited first, 2 of 2)

- [Seglearn: A Python Package for Learning Sequences and Time Series](https://mlsanity.com/paper/1803.08118/) (2018)
- [Mining Electronic Health Records: A Survey](https://mlsanity.com/paper/1702.03222/) (2017)

## Built on by (most cited first, 8 of 8)

- [Do Not Sleep on Traditional Machine Learning: Simple and Interpretable Techniques Are Competitive to Deep Learning for Sleep Scoring](https://mlsanity.com/paper/2207.07753/) (2022)
- [Feature-Based Time-Series Analysis in R using the theft Package](https://mlsanity.com/paper/2208.06146/) (2022)
- [Plotly-Resampler: Effective Visual Analytics for Large Time Series](https://mlsanity.com/paper/2206.08703/) (2022)
- [Left-Right Swapping and Upper-Lower Limb Pairing for Robust Multi-Wearable Workout Activity Detection](https://mlsanity.com/paper/2408.03947/) (2024)
- [FeatEHR-LLM: Leveraging Large Language Models for Feature Engineering in Electronic Health Records](https://mlsanity.com/paper/2604.22534/) (2026)
- [Performance and utility trade-off in interpretable sleep staging](https://mlsanity.com/paper/2211.03282/) (2022)
- [Magnitude and Rotation Invariant Detection of Transportation Modes with Missing Data Modalities](https://mlsanity.com/paper/2407.11048/) (2024)
- [Timeseria: an object-oriented time series processing library](https://mlsanity.com/paper/2410.09567/) (2024)

## Abstract (arXiv)

Time series processing and feature extraction are crucial and time-intensive steps in conventional machine learning pipelines. Existing packages are limited in their applicability, as they cannot cope with irregularly-sampled or asynchronous data and make strong assumptions about the data format. Moreover, these packages do not focus on execution speed and memory efficiency, resulting in considerable overhead. We present texttttsflex, a Python toolkit for time series processing and feature extraction, that focuses on performance and flexibility, enabling broad applicability. This toolkit leverages window-stride arguments of the same data type as the sequence-index, and maintains the sequence-index through all operations. texttttsflex is flexible as it supports (1) multivariate time series, (2) multiple window-stride configurations, and (3) integrates with processing and feature functions from other packages, while (4) making no assumptions about the data sampling regularity, series alignment, and data type. Other functionalities include multiprocessing, detailed execution logging, chunking sequences, and serialization. Benchmarks show that texttttsflex is faster and more memory-efficient compared to similar packages, while being more permissive and flexible in its utilization.
