pytorch-forecasting: a high-level deep learning framework for interpretable multi-horizon time series forecasting

pytorch-forecasting: a high-level deep learning framework for interpretable multi-horizon time series forecasting

What it solves

PyTorch Forecasting provides a high-level API for time series forecasting using state-of-the-art deep learning architectures. It simplifies the process of handling complex time series data, training neural networks, and deploying them for real-world forecasting tasks.

How it works

Built on PyTorch Lightning, the package abstracts the complexities of training on CPUs or GPUs. It uses a specialized TimeSeriesDataSet class to handle variable transformations, missing values, and multiple history lengths. Users can choose from several pre-implemented neural network architectures, such as Temporal Fusion Transformers (TFT), N-BEATS, N-HiTS, and DeepAR, and optimize them using multi-horizon metrics and hyperparameter tuning via Optuna.

Who it’s for

It is designed for both professionals seeking maximum flexibility in time series forecasting and beginners who need reasonable defaults to get started quickly.

Highlights

  • State-of-the-art models: Includes implementations of Temporal Fusion Transformers, N-BEATS, N-HiTS, and DeepAR.
  • Data abstraction: A dedicated dataset class for managing time series metadata and transformations.
  • Scalable training: Leverages PyTorch Lightning for automatic logging and seamless scaling across hardware.
  • Interpretability: Includes models with built-in interpretation capabilities and generic visualizations for actual vs. predictions.

Sources