A description of your project
Project description
TSFast
Description
tsfastis an open-source deep learning library for time series analysis and system identification tasks. Built on PyTorch & fastai, 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 the foundations
of PyTorch and fastai, it provides efficient implementations of various
deep learning models and utilities.
Key Features
- Specialized Data Handling for Time Series:
- Employs
SequenceBlock(built onfastai.TransformBlock) for robust sequence data processing pipelines. - Includes a range of transforms tailored for sequences, such as
SeqSlice,SeqNoiseInjection, andNormalizeadapted for time series tensors. - Features advanced data loading with
TbpttDl(for Truncated Backpropagation Through Time), and factories forWeightedDLandBatchLimitDL.
- Employs
- Predefined Datasets & Helpers: Offers easy-to-use benchmark
datasets (e.g.,
create_dls_silverboxfromidentibench) 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 likeSeqLinearand stateful batch normalization. - Integrated
fastaiLearner: FeaturesRNNLearner,TCNLearner,CRNNLearner, etc., extendingfastai’sLearnerfor streamlined model training, equipped with custom time-series losses (e.g.,fun_rmse,nrmse) and callbacks (e.g.,TbpttResetCB,ARInitCB,SkipFirstNCallback). - System Identification & Prediction:
- Supports simulation (prediction based on inputs) and N-step ahead forecasting.
- Includes specialized models and callbacks for system identification
tasks like FRANSYS (
FranSys,FranSysCallback) and AR models (AR_Model,ARProg). - Provides an
InferenceWrapperfor easier model deployment and prediction.
- Hyperparameter Optimization: Integrates with Ray Tune via
HPOptimizerfor efficient hyperparameter searching.
Installation
You can install the latest stable version from pip using:
pip install tsfast
For development installation:
git clone https://github.com/daniel-om-weber/tsfast
cd tsfast
pip install -e '.[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 *
dls = create_dls_silverbox()
dls.show_batch(max_n=1)
lrn = RNNLearner(dls)
lrn.fit_flat_cos(1)
<style>
/* Turns off some styling */
progress {
/* gets rid of default border in Firefox and Opera. */
border: none;
/* Needs to be in here for Safari polyfill so background images work as expected. */
background-size: auto;
}
progress:not([value]), progress:not([value])::-webkit-progress-bar {
background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);
}
.progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {
background: #F44336;
}
</style>
| epoch | train_loss | valid_loss | fun_rmse | time |
|---|---|---|---|---|
| 0 | 0.006716 | 0.006925 | 0.015471 | 01:55 |
lrn.show_results(max_n=1)
<style>
/* Turns off some styling */
progress {
/* gets rid of default border in Firefox and Opera. */
border: none;
/* Needs to be in here for Safari polyfill so background images work as expected. */
background-size: auto;
}
progress:not([value]), progress:not([value])::-webkit-progress-bar {
background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);
}
.progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {
background: #F44336;
}
</style>
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tsfast-0.1.4.tar.gz.
File metadata
- Download URL: tsfast-0.1.4.tar.gz
- Upload date:
- Size: 15.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
826c777fc060ff47c7a8d1d7698eb1117e8a19360743bfb9577072e880d2981d
|
|
| MD5 |
3e619f5343d80bd2ef8641529ad05a69
|
|
| BLAKE2b-256 |
00617b75a92457e69296fbf579662e55c8e49a5ceb04805d3e5b7a7cd2461570
|
File details
Details for the file tsfast-0.1.4-py3-none-any.whl.
File metadata
- Download URL: tsfast-0.1.4-py3-none-any.whl
- Upload date:
- Size: 70.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ffb02fa69f85e6be573e5dad8e87d9365cf3f06e72d4edccd74cc53170dc4c5
|
|
| MD5 |
00eacf87dfba78a940c3404ea23531b7
|
|
| BLAKE2b-256 |
2cfc55874b30da894d12a445a38047c89390c2068aa0526c910395ff6fd4b858
|