Quick Start#
This guide shows you how to install and use chronocratic-datasets with PyTorch Lightning.
Installation#
Install the package from PyPI:
pip install chronocratic-datasets
For development (with docs tooling):
pip install -e ".[docs]"
Basic Workflow#
The package provides LightningDataModule subclasses for each dataset family.
A typical workflow looks like this:
Forecasting Example#
from pathlib import Path
from chronocratic.datasets import ForecastingMode, WeatherDataModule
weather = WeatherDataModule(
dataset_file_path=Path("data/weather.csv"),
mode=ForecastingMode.UNIVARIATE,
seq_len=24,
forecast_horizon=168,
)
weather.prepare_data()
weather.setup()
train_loader = weather.train_dataloader()
Classification Example#
from pathlib import Path
from chronocratic.datasets import UCRClassificationDataModule
module = UCRClassificationDataModule(
dataset_folder_path=Path("data/FogiDataset1"),
target_column_name="class",
scale_data=True,
)
module.prepare_data()
module.setup()
train_loader = module.train_dataloader()
val_loader = module.val_dataloader()
test_loader = module.test_dataloader()
Next Steps#
See the Forecasting Modules guide for in-depth forecasting dataset usage and additional datasets (ETT, Electricity).
See the Classification Modules guide for UCR and UEA classification benchmarks.
Browse the DataModule API Reference reference for full parameter documentation.
Browse the Enum API Reference reference for all enum options.