TFTS Documentation#

GitHub

TFTS (TensorFlow Time Series) supports state-of-the-art deep learning time series models for production, research and data competitions. Specifically, the package provides:

  • Flexible and powerful modular design for time series task

  • Easy-to-use advanced SOTA deep learning models

  • Allow training on CPUs, single and multiple GPUs, TPU

Quick Start#

1. Requirements#

To get started with tfts, follow the steps below:

2. Installation#

Now you are ready, proceed with

$ pip install tfts

2. Learn more#

Visit Quick start to learn more about the package.

Tutorials#

The Tutorials section provides guidance on

  • how to prepare datasets for single-value, multi-value, single-step, and multi-steps prediction

  • how to use models and implement new ones.

Models#

1. Design a Custom Model with TFTS#

import tensorflow as tf
from tfts import AutoConfig, AutoModel

def build_model(use_model, input_shape):
   inputs = tf.keras.layers.Input(input_shape)
   config = AutoConfig.for_model(use_model)

   backbone = AutoModel.from_config(config)
   outputs = backbone(inputs)
   model = tf.keras.Model(inputs, outputs=outputs)

   optimizer = tf.keras.optimizers.Adam(0.003)
   loss_fn = tf.keras.losses.MeanSquaredError()

   model.compile(optimizer, loss_fn)
   return model

model = build_model(use_model="bert", input_shape=(24, 3))
model.summary()

2. More highlights#

The tfts library supports the SOTA deep learning models for time series.

Tricks#

Visit Tricks if you want to know more tricks to improve the prediction performance.

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