Skip to main content

Deep learning library for time series analysis and system identification

Project description

tsfast logo

TSFast

PyPI version License: Apache 2.0 Python Versions

Description

tsfast is an open-source deep learning library for time series analysis and system identification tasks. Built on PyTorch, it offers efficient deep learning models and utilities.

tsfast is an open-source deep learning package that focuses on system identification and time series analysis tasks. Built on PyTorch, it provides efficient implementations of various deep learning models and utilities.

Key Features

  • Specialized Data Handling for Time Series:
    • HDF5-backed data pipeline with signal blocks for flexible sequence data processing.
    • Includes a range of transforms tailored for sequences, such as noise injection and normalization adapted for time series tensors.
    • Features advanced data loading with TBPTT (Truncated Backpropagation Through Time) support.
  • Predefined Datasets & Helpers: Offers easy-to-use benchmark datasets (e.g., create_dls_silverbox from identibench) for rapid prototyping and experimentation.
  • Tailored Time Series Models: Provides implementations of Recurrent Neural Networks (RNNs, including DenseNet_RNN, ResidualBlock_RNN), Convolutional Neural Networks (TCNs, CausalConv1d), and combined architectures (CRNN, SeperateCRNN) specifically designed for sequence modeling. Includes building blocks like SeqLinear and layer normalization.
  • Integrated Training: Features RNNLearner, TCNLearner, CRNNLearner, etc., with a lightweight pure-PyTorch training loop, custom time-series losses (e.g., fun_rmse, nrmse), and composable transforms for augmentation and regularization.
  • System Identification & Prediction:
    • Supports simulation (prediction based on inputs) and N-step ahead forecasting.
    • Includes specialized models for system identification tasks like FRANSYS (FranSys, FranSysLearner) and AR models (AR_Model, ARProg).
    • Provides an InferenceWrapper for easier model deployment and prediction.
  • Hyperparameter Optimization: Integrates with Ray Tune via HPOptimizer for efficient hyperparameter searching.

Installation

You can install the latest stable version using:

pip install tsfast

For development installation:

git clone https://github.com/daniel-om-weber/tsfast
cd tsfast
pip install -e '.[dev]'
# or using uv:
uv sync --extra dev

Quick Start

Here is a quick example using a benchmark dataloader. It demonstrates loading and visualizing data, training a RNN, and visualizing the results.

from tsfast.basics import *

# Load benchmark dataset
dls = create_dls_silverbox()

# Train an RNN and visualize results
lrn = RNNLearner(dls)
lrn.fit_flat_cos(1)
lrn.show_results(max_n=1)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Citation

If you use tsfast in your research, please cite:

@Misc{tsfast,
author = {Daniel O.M. Weber},
title = {tsfast - A deep learning library for time series analysis and system identification},
howpublished = {Github},
year = {2024},
url = {https://github.com/daniel-om-weber/tsfast}
}

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

tsfast-0.3.0.tar.gz (14.5 MB view details)

Uploaded Source

Built Distribution

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

tsfast-0.3.0-py3-none-any.whl (92.5 kB view details)

Uploaded Python 3

File details

Details for the file tsfast-0.3.0.tar.gz.

File metadata

  • Download URL: tsfast-0.3.0.tar.gz
  • Upload date:
  • Size: 14.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tsfast-0.3.0.tar.gz
Algorithm Hash digest
SHA256 9ba89bf7eeb072d1361810bd4773c2c58f029c798f060f4a692fd3037a914a13
MD5 121007f13f883f75c28efc38ea42cd6f
BLAKE2b-256 7b36853d1e4a9a01f59946c2e2f2bde5ca2bccd1837846dbfbf6d056b67c8661

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsfast-0.3.0.tar.gz:

Publisher: publish.yaml on daniel-om-weber/tsfast

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tsfast-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: tsfast-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 92.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tsfast-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e493dd5e7643ba3da1419e807633f0a324f833ec7941d6101621869b71176ac0
MD5 586eff22301cbf9fc17e5339f8bd4961
BLAKE2b-256 4640c2dbffae390ec219cb115650e83739ad7aa8a266d9593ea458142fbd7018

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsfast-0.3.0-py3-none-any.whl:

Publisher: publish.yaml on daniel-om-weber/tsfast

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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