Skip to main content

Irregular time series made easy

Project description

Logo

📖 Documentation · ⚙️ Tutorials
CI/CD build docs pypi publish
Code PyPI version PyPI - Python Version !black
Community contributions welcome
Paper arXiv

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)

Citation

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

@misc{spinnato2025pyrregular,
      title={PYRREGULAR: A Unified Framework for Irregular Time Series, with Classification Benchmarks}, 
      author={Francesco Spinnato and Cristiano Landi},
      year={2025},
      eprint={2505.06047},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2505.06047}, 
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyrregular-0.1.10.tar.gz (223.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyrregular-0.1.10-py3-none-any.whl (54.2 kB view details)

Uploaded Python 3

File details

Details for the file pyrregular-0.1.10.tar.gz.

File metadata

  • Download URL: pyrregular-0.1.10.tar.gz
  • Upload date:
  • Size: 223.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for pyrregular-0.1.10.tar.gz
Algorithm Hash digest
SHA256 ef6c09e6c601b40cdce70342ac92e9fb6e73abb6c1ccbb4acf6df1ccff45bfac
MD5 ca39b2491be0a42549b96cac2a2d1374
BLAKE2b-256 3ec223e4a581e383c4eb73735a72414e402043bad44b6cc2aef36924e12e48b2

See more details on using hashes here.

File details

Details for the file pyrregular-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: pyrregular-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 54.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for pyrregular-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 3600a837c0a24ce85c77bb9e4fcec12a1198e1d1103afc7e9de6bdddfdebdd94
MD5 eccde445c5dd13fbf4cd55b15a6bfafd
BLAKE2b-256 cca0eea549c84201487fe5f7ac90cba75a52281dff50f337cbff81ed29ef3399

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page