Skip to main content

Irregular time series made easy

Project description

pyrregular

Logo

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

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)

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.8.tar.gz (222.4 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.8-py3-none-any.whl (52.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyrregular-0.1.8.tar.gz
  • Upload date:
  • Size: 222.4 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.8.tar.gz
Algorithm Hash digest
SHA256 ee5d6e8c735b772a9a29876acc51713bd51dc4b947c9402b9d2d1b24bdc336f8
MD5 84804901be3a16755f035504e5c53006
BLAKE2b-256 7a29c2e5d58cc15edf6dbb422c6b468643d103641ff4b4507c97ca0e970c29ad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyrregular-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 52.9 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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 3bdd2681319dba53a409398a0b01aae6d6c660eea1691c6d4e7fb813385734ad
MD5 20118dfdcc31b728229ed8344a92cd78
BLAKE2b-256 62e13817d534a2fac17634ab04d4aba0e484fe4d5bb224f126f58926269ca7c7

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