TSFast¶
A deep learning library for time series analysis and system identification, built on PyTorch.
Key Features¶
- Specialized Data Handling —
WindowedDataset, sequence transforms,TbpttLearnerfor 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 Training —
RNNLearner,TCNLearner,CRNNLearnerwith custom losses (nrmse,cut_loss) and transforms - System Identification — Simulation, N-step prediction, FranSys, autoregressive models
- Physics-Informed NNs — Embed governing equations into training via
CollocationLoss,PhysicsLoss, andPIRNN - Hyperparameter Optimization — Ray Tune integration via
HPOptimizer - Deployment —
InferenceWrapperfor NumPy-in/NumPy-out inference, ONNX export, model save/load - Performance — CUDA graph acceleration via
GraphedStatefulModelfor low-overhead GPU training
Quick Start¶
from tsfast.tsdata.benchmark import create_dls_silverbox
from tsfast.training import RNNLearner
# Load benchmark dataset
dls = create_dls_silverbox()
# Train an RNN and visualize results
lrn = RNNLearner(dls)
lrn.fit_flat_cos(n_epoch=1)
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:
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.training import RNNLearner).
Citation¶
If you use TSFast in your research, please cite:
