Skip to main content

Deep learning time series with TensorFlow

Project description


LICENSE PyPI Version Download Build Status Lint Status Docs Status Code Coverage CodeQL Status

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.

Tutorial

Open In Colab

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

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)

Uploaded Source

Built Distribution

tfts-0.0.3-py3-none-any.whl (45.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page