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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyrregular-0.1.9.tar.gz
  • Upload date:
  • Size: 222.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.9.tar.gz
Algorithm Hash digest
SHA256 1b941b4a1845e5e1d61bef3f9d910d604aace721f7d4445fde34ec380e7d844b
MD5 fbda6162a16f90555989436d1484eeed
BLAKE2b-256 e7ab118815e4d219eaa0ffbf043e66a7c63fea32b21fbcafe3fe59b9f5373ea8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyrregular-0.1.9-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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 a32e08e75a0672a2bfe601f2a691daaae99c9af237d0b00ccd415c3bb482e7b4
MD5 cd062b53bc63eba7040724f03085f19a
BLAKE2b-256 ac5c434736ff72dd861f039015135fc9ccb14e77eccc92943f1a2f32460a7759

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