Deep learning time series with TensorFlow
Project description
Documentation | Tutorials | Release Notes | 中文
TFTS (TensorFlow Time Series) is a python package for time series task, supporting the classical and SOTA deep learning methods in TensorFlow.
- Flexible and powerful design for time series task
- Advanced deep learning models
- Documentation lives at time-series-prediction.readthedocs.io
Tutorial
Installation
- python >= 3.7
- tensorflow >= 2.1
$ pip install tfts
Usage
import matplotlib.pyplot as plt
import tfts
from tfts import AutoModel, KerasTrainer, Trainer
train_length = 24
predict_length = 8
# train is a tuple of (x_train, y_train), valid is (x_valid, y_valid)
train, valid = tfts.get_data('sine', train_length, predict_length, test_size=0.2)
model = AutoModel('seq2seq', predict_length)
trainer = KerasTrainer(model)
trainer.train(train, valid)
pred = trainer.predict(valid[0])
trainer.plot(history=valid[0], true=valid[1], pred=pred)
plt.show()
Examples
- TFTS-prediction for basic usage
- TFTS-Bert model wins the 3rd place in KDD Cup 2022 Baidu-wind power forecasting
- TFTS-Seq2seq model wins the 4th place in Alibaba Tianchi-ENSO prediction 2021
if you prefer to use PyTorch, please try pytorch-forecasting
Citation
If you find tfts project useful in your research, please consider cite:
@misc{tfts2020,
author = {Longxing Tan},
title = {Time series prediction},
year = {2020},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/longxingtan/time-series-prediction}},
}
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
tfts-0.0.3.tar.gz
(31.5 kB
view hashes)
Built Distribution
tfts-0.0.3-py3-none-any.whl
(45.5 kB
view hashes)