Installation

March 23, 2026View on GitHub

Logo

馃摉 Documentation鈿欙笍 Tutorials
CI/CDbuild docs pypi publish
CodePyPI version PyPI - Python Version !black
Communitycontributions welcome
PaperarXiv

Installation

You can install via pip with:

pip install pyrregular

For third party models use:

pip install pyrregular[models]

Quick Guide

List datasets

If you want to see all the datasets available, you can use the list_datasets function:

from pyrregular import list_datasets

df = list_datasets()

Load a dataset

To load a dataset, you can use the load_dataset function. For example, to load the "Garment" dataset, you can do:

from pyrregular import load_dataset

df = load_dataset("Garment.h5")

The dataset is saved in the default os cache directory, which can be found with:

import pooch

print(pooch.os_cache("pyrregular"))

The repository is hosted at: https://huggingface.co/datasets/splandi/pyrregular/

Downstream tasks

Classification

To use the dataset for classification, you can just "densify" it:

from pyrregular import load_dataset

df = load_dataset("Garment.h5")
X, _ = df.irr.to_dense()
y, split = df.irr.get_task_target_and_split()

X_train, X_test = X[split != "test"], X[split == "test"]
y_train, y_test = y[split != "test"], y[split == "test"]

# We have ready-to-go models from various libraries:
from pyrregular.models.rocket import rocket_pipeline

model = rocket_pipeline
model.fit(X_train, y_train)
model.score(X_test, y_test)

There are several pipelines available in pyrregular.models:

馃捑 Library馃摉 Source馃敆 Pipeline鈩癸笍 Type
aeonSpinnato et al. (2024)borfdictionary-based transform + lgbm classifier
aeonrifcinterval-based transform + lgbm classifier
diffraxKidger et al. (2020)ncdeneural controlled differential equations
pypotsCao et al. (2018)britsbidirectional recurrent imputation network
pypotsChe et al. (2018)grudgated recurrent unit with decay
pypotsZhang et al. (2021)raindropgraph neural network
pypotsDu et al. (2023)saitsself-attention-based imputation transformer
pypotsWu et al. (2022)timesnettemporal 2d-variation transformer
sktimeKe et al. (2017)lgbmgradient boosted tree
sktimeDempster et al. (2021)rocketkernel-based transform + lgbm classifier
sktimeBagheri et al. (2016)svmsupport vector machine with distance kernel
tslearnSakoe & Chiba (1978)knndistance-based with dynamic time warping

Regression

Regression is still work in progress, but is available for some datasets:

from pyrregular import load_dataset
from sklearn.pipeline import make_pipeline
from aeon.transformations.collection.dictionary_based import BORF
from sklearn.linear_model import LassoCV

df = load_dataset("Garment.h5")
X, _ = df.irr.to_dense()
y, split = df.irr.get_task_target_and_split("regression")

X_train, X_test = X[split != "test"], X[split == "test"]
y_train, y_test = y[split != "test"], y[split == "test"]

borf_pipeline = make_pipeline(
    BORF(),
    LassoCV(),
)
model = borf_pipeline
model.fit(X_train, y_train)
model.score(X_test, y_test)

Available Datasets

馃搱 Dataset馃摉 Source
Alembics Bowls FlasksSpinnato & Landi, 2025
AllGestureWiimoteXGuna et al., 2014
AllGestureWiimoteYGuna et al., 2014
AllGestureWiimoteZGuna et al., 2014
AnimalsFerrero et al., 2018
AsphaltObstaclesCoordinatesSouza, 2018
AsphaltPavementTypeCoordinatesSouza, 2018
AsphaltRegularityCoordinatesSouza, 2018
CharacterTrajectoriesWilliams et al., 2006
DodgerLoopDayIhler et al., 2006
DodgerLoopGameIhler et al., 2006
DodgerLoopWeekendIhler et al., 2006
GeolifeZheng et al., 2009; Zheng et al., 2008; Zheng et al., 2010
GestureMidAirD1Caputo et al., 2018
GestureMidAirD2Caputo et al., 2018
GestureMidAirD3Caputo et al., 2018
GesturePebbleZ1Mezari & Maglogiannis, 2018
GesturePebbleZ2Mezari & Maglogiannis, 2018
GPS Data of SeabirdsBrowning et al., 2018
InsectWingbeatChen et al., 2014
JapaneseVowelsKudo et al., 1999
Localization Data for Person ActivityVidulin et al., 2010
MelbournePedestrianCity of Melbourne, 2019
MIMIC-III Clinical Database (Demo)Johnson et al., 2016; Johnson et al., 2019; Goldberger et al., 2000
PAMAP2 Physical Activity MonitoringReiss & Stricker, 2012
PhysioNet 2012Silva et al., 2012
PhysioNet 2019Reyna et al., 2020
PickupGestureWiimoteZGuna et al., 2014
PLAIDGao et al., 2014
Productivity Prediction of Garment EmployeesImran et al., 2021
ShakeGestureWiimoteZGuna et al., 2014
SpokenArabicDigitsHammami & Bedda, 2010
TaxiMoreira-Matias et al., 2013
VehiclesChorochronos Archive, 2019

Citation

If you use this package in your research, please cite the following paper:

@inproceedings{
    spinnato2026pyrregular,
    title={{PYRREGULAR}: A Unified Framework for Irregular Time Series, with Classification Benchmarks},
    author={Francesco Spinnato and Cristiano Landi},
    booktitle={The Fourteenth International Conference on Learning Representations},
    year={2026},
    url={https://openreview.net/forum?id=qetBM8nLkf}
}