Skip to content
TSFast logo

TSFast

PyPI version License: Apache 2.0 Python Versions

A deep learning library for time series analysis and system identification, built on PyTorch.


Key Features

  • Specialized Data HandlingWindowedDataset, sequence transforms, TbpttLearner for truncated backpropagation
  • Benchmark Datasets — One-line access to Silverbox, Wiener-Hammerstein, Cascaded Tanks, and more via identibench
  • Time Series Models — RNNs (DenseNet, Residual), TCNs, CRNNs with layer normalization
  • Integrated TrainingRNNLearner, TCNLearner, CRNNLearner with custom losses (nrmse, cut_loss) and transforms
  • System Identification — Simulation, N-step prediction, FranSys, autoregressive models
  • Hyperparameter Optimization — Ray Tune integration via HPOptimizer
  • DeploymentInferenceWrapper for NumPy-in/NumPy-out inference, ONNX export

Quick Start

from tsfast.basics import *

# Load benchmark dataset and visualize
dls = create_dls_silverbox()
dls.show_batch(max_n=1)

# Train an RNN
lrn = RNNLearner(dls)
lrn.fit_flat_cos(1)

# Visualize results
lrn.show_results(max_n=1)

Ready to learn more? Start with Installation or jump to Your First Model.

Quick Import

TSFast provides a convenience barrel import for interactive use:

from tsfast.basics import *

This imports all public symbols from tsdata, training, models, prediction, and inference. For production code, prefer explicit imports from specific modules (e.g., from tsfast.models.rnn import RNNLearner).

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}
}