PYRREGULAR: A Unified Framework for Irregular Time Series, with Classification Benchmarks
Irregular temporal data, characterized by varying recording frequencies, differing observation durations, and missing values, presents significant challenges across fields like mobility, healthcare, and environmental science. Existing research communities often overlook or address these challenges in isolation, leading to fragmented tools and methods. To bridge this gap, we introduce a unified framework, and the first standardized dataset repository for irregular time series classification, built on a common array format to enhance interoperability. This repository comprises 34 datasets on which we benchmark 12 classifier models from diverse domains and communities. This work aims to centralize research efforts and enable a more robust evaluation of irregular temporal data analysis methods.
💡 Research Summary
The paper addresses a critical gap in the machine‑learning community concerning irregular time series (ITS), which are characterized by non‑uniform sampling intervals, varying observation lengths, and missing values. While regular time‑series classification enjoys mature benchmark suites such as UCR/UAE, irregular data have lacked a unified representation, standardized datasets, and comprehensive cross‑domain evaluations. To remedy this, the authors introduce “pyrregular,” a unified framework that (1) defines a clear taxonomy of irregularities, (2) proposes a common array format that can capture all three sources of irregularity—uneven sampling, partial observation, and raggedness—and (3) provides the first public repository of 34 real‑world irregular time‑series classification datasets together with a benchmark of 12 state‑of‑the‑art classifiers drawn from statistics, classic machine learning, and modern deep‑learning communities.
The taxonomy separates irregularities into three independent dimensions. Uneven sampling refers to varying time gaps between successive measurements; partial observation denotes explicit missing values (recorded as NaN) where a measurement was expected; raggedness captures structural mismatches that arise when multivariate signals do not share the same timestamps, leading to length, shift, or sampling‑rate differences that typically require padding. By proving that none of these conditions implies the others, the authors justify the need for a data structure that can represent each independently.
The core of the framework is a conversion pipeline between a “long format” (i, j, t, x) and a sparse coordinate‑list (COO) tensor (i, j, k, x). The long format stores each observation together with its real‑valued timestamp t; the COO format stores only integer indices k that correspond to the sorted unique timestamps across the whole dataset. A deterministic mapping t ↔ k is built once per dataset, allowing efficient construction of a sparse 3‑D tensor X ∈ ℝⁿ˙×d×T, where n is the number of instances, d the number of channels, and T the total number of distinct timestamps. Crucially, the framework distinguishes explicit NaN entries (partial observation) from implicit NaNs that arise when the sparse tensor is densified (raggedness), enabling a single tensor to encode both types of missingness without ambiguity.
Implementation-wise, pyrregular builds on xarray for labeled multidimensional data and the Python “sparse” library for COO tensors. A custom accessor provides high‑level operations such as slicing, temporal windowing, and conversion to dense NumPy/PyTorch/TensorFlow arrays. Because the accessor respects the original timestamps, downstream models can either (a) ingest the sparse representation directly (e.g., via PyTorch’s sparse tensors) or (b) be fed a dense array where missing values are represented by NaN, preserving the semantics needed by many deep‑learning architectures. The preprocessing step requires only a user‑defined generator that yields rows in the long format; the library handles all mapping, deduplication, and storage, making the pipeline reproducible and library‑agnostic.
For the benchmark, the authors curated 34 heterogeneous datasets spanning domains such as mobile GPS trajectories, wearable health sensors, and environmental monitoring stations. Each dataset retains its original timestamp irregularities and missing‑value patterns, avoiding the common practice of artificially dropping observations from regular datasets. Twelve classifiers were evaluated: traditional methods (Random Forest, SVM, XGBoost), time‑aware statistical models (Time‑Series Forest, Shapelet Transform), and deep‑learning approaches (Temporal Convolutional Networks, Transformer‑based models, Neural Ordinary Differential Equations). All models were trained under identical preprocessing (conversion to the pyrregular format) and hyper‑parameter tuning protocols.
Results demonstrate that models explicitly leveraging timestamp information (e.g., Time‑Aware LSTM, Neural ODE) consistently outperform those that first impute or resample to a regular grid. The advantage is especially pronounced on datasets with high rates of partial observation, confirming that preserving the original temporal semantics yields better discriminative power. Moreover, the sparse representation dramatically reduces memory consumption—up to 70 % less than dense equivalents—allowing larger batches and longer sequences to be processed without GPU memory overflow. The benchmark also reveals that no single model dominates across all datasets; performance varies with the dominant type of irregularity, suggesting that future research should consider hybrid architectures that can adapt to uneven sampling, missing values, and raggedness simultaneously.
In conclusion, pyrregular delivers a practical, open‑source solution that unifies data representation, preprocessing, and evaluation for irregular time‑series classification. By releasing both the codebase (GitHub) and the curated dataset repository, the authors enable reproducible research and foster cross‑community collaboration. The paper outlines future extensions, including forecasting benchmarks, multimodal fusion, and automated timestamp alignment techniques, positioning pyrregular as a foundational infrastructure for the growing field of irregular temporal data analysis.
Comments & Academic Discussion
Loading comments...
Leave a Comment