Skip to main content
ToolPotion

N-BEATS

N-BEATS is a neural-network based model for univariate time-series forecasting. Developed by ServiceNow Research, it implements the N-BEATS algorithm for reproducible experimental results. This repository provides the PyTorch implementation, dataset loaders, and experiment configurations for advanced time-series analysis.

Description

N-BEATS is a sophisticated neural-network based model specifically designed for univariate time-series forecasting. It represents a significant contribution from ServiceNow Research, with its origins tracing back to Element AI. The project aims to provide a robust implementation of the N-BEATS algorithm, enabling researchers and practitioners to reproduce experimental results presented in the associated paper.

The repository is structured to facilitate easy access and usage. The core PyTorch implementation of the N-BEATS model can be found within the `models/nbeats.py` file. For data handling, dataset loaders for various datasets used in the paper are located in the `datasets/*.py` directory. The `experiments/*` directory houses the experimental setups required to replicate the paper's results, each containing a `main.py` script for training and forecasting logic, alongside configuration files for both generic and interpretable model variants.

Results and performance metrics are documented in the `notebooks` directory, with a dedicated notebook for each experiment. These notebooks showcase final scores and insights into the effectiveness of different ensemble sizes, noting that smaller ensembles often yield comparable results to larger ones. This implementation is described as a 'lighter' version of the original N-BEATS, offering performance that is generally on the same state-of-the-art level, with occasional variations in results.

The project emphasizes reproducibility through Docker, making it accessible for users with or without NVIDIA GPUs. The `Makefile` provides commands for initializing the Docker image, downloading datasets, running tests, building experiments, and executing forecasts on both CPU and GPU. Detailed instructions are provided for setting up the environment, building the Docker image, downloading datasets, and running experiments with customizable parameters such as repeats and lookback periods. The output of experiments, including logs, losses, snapshots, and final forecasts, is stored in the `storage/experiments` directory.

N-BEATS is particularly valuable for data scientists, machine learning engineers, and researchers involved in time-series analysis, forecasting, and predictive modeling. Its interpretable nature and state-of-the-art performance make it a powerful tool for understanding and predicting future trends in univariate data across various domains.

N-BEATS Highlights

  • Neural-network based model for univariate time-series forecasting

  • Implementation of the N-BEATS algorithm

  • Reproducible experimental results

  • PyTorch implementation available

  • Dataset loaders for various datasets

  • Configuration files for generic and interpretable models

  • Docker support for environment setup

  • CPU and GPU execution support

  • Detailed instructions for reproduction

  • Storage for experiment logs, losses, and forecasts

Getting Started with N-BEATS

  1. Set up environment: Ensure Docker is installed and adjust Makefile for your environment.

  2. Build Docker image: Run `make init` to build the Docker image.

  3. Download datasets: Execute `make dataset` to download required datasets.

  4. Build an experiment: Use `make build config=<path_to_config.gin>` to generate experiment configurations.

  5. Run experiments: Utilize `make run command=<path_to_command>` for CPU or `make run command=<path_to_command> gpu=<gpu-id>` for GPU.

  6. Get experiment statistics: Run a JupyterLab notebook via `make notebook port=<port>` to analyze performance.

N-BEATS's Use Cases

  • Time-series forecasting
  • Predictive analytics
  • Demand forecasting
  • Financial forecasting
  • Resource planning

FAQ from N-BEATS

N-BEATS Reviews

Loading...

Popular AI Tools Like N-BEATS

GluonTS is a Python package for probabilistic time series modeling, leveraging deep learning models built on PyTorch and MXNet. It facilitates accurate forecasting by generating…

AI Models & LLMs

AI Models

PatchTST is an official implementation of a Transformer-based model for long-term time series forecasting. It segments time series into patches and processes them independently,…

AI Models & LLMs

AI Models

LSTNet is a deep learning model designed for time series forecasting. It effectively models both long-term and short-term temporal patterns using a combination of recurrent neural…

AI Models & LLMs

AI Models

FEDformer is a Frequency Enhanced Decomposed Transformer designed for efficient long-term time series forecasting. It achieves linear complexity with sequence length,…

AI Models & LLMs

AI Models

Autoformer is an AI model for long-term time series forecasting, leveraging decomposition transformers and auto-correlation mechanisms. It achieves state-of-the-art results across…

AI Models & LLMs

AI Models

LTSF-Linear is an official PyTorch implementation for "Are Transformers Effective for Time Series Forecasting?". It introduces a family of linear models (Linear, DLinear, NLinear)…

AI Models & LLMs

Prophet is an open-source forecasting procedure implemented in R and Python. It automates time series forecasting with fast, tunable models. Designed for data scientists and…

Forecasting & Predictive Analytics

This repository provides a PyTorch implementation of the "Simple and Deep Graph Convolutional Networks" (GCNII) model. It includes code for replicating semi-supervised and…

AI Models & LLMs