Nixtla / neuralforecast

Scalable and user friendly neural :brain: forecasting algorithms.
https://nixtlaverse.nixtla.io/neuralforecast
Apache License 2.0
3.13k stars 359 forks source link
baselines baselines-zoo deep-learning deep-neural-networks deepar esrnn forecasting hierarchical-forecasting hint machine-learning nbeats nbeatsx neural-network nhits probabilistic-forecasting pytorch robust-regression tft time-series transformer

Nixtla   Tweet  Slack

Neural 🧠 Forecast

User friendly state-of-the-art neural forecasting models

[![CI](https://github.com/Nixtla/neuralforecast/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/Nixtla/neuralforecast/actions/workflows/ci.yaml) [![Python](https://img.shields.io/pypi/pyversions/neuralforecast)](https://pypi.org/project/neuralforecast/) [![PyPi](https://img.shields.io/pypi/v/neuralforecast?color=blue)](https://pypi.org/project/neuralforecast/) [![conda-nixtla](https://img.shields.io/conda/vn/conda-forge/neuralforecast?color=seagreen&label=conda)](https://anaconda.org/conda-forge/neuralforecast) [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/Nixtla/neuralforecast/blob/main/LICENSE) [![docs](https://img.shields.io/website-up-down-green-red/http/nixtla.github.io/neuralforecast.svg?label=docs)](https://nixtla.github.io/neuralforecast/) [![All Contributors](https://img.shields.io/badge/all_contributors-11-orange.svg?style=flat-square)](#contributors-) **NeuralForecast** offers a large collection of neural forecasting models focusing on their performance, usability, and robustness. The models range from classic networks like RNNs to the latest transformers: `MLP`, `LSTM`, `GRU`, `RNN`, `TCN`, `TimesNet`, `BiTCN`, `DeepAR`, `NBEATS`, `NBEATSx`, `NHITS`, `TiDE`, `DeepNPTS`, `TSMixer`, `TSMixerx`, `MLPMultivariate`, `DLinear`, `NLinear`, `TFT`, `Informer`, `AutoFormer`, `FedFormer`, `PatchTST`, `iTransformer`, `StemGNN`, and `TimeLLM`.

Installation

You can install NeuralForecast with:

pip install neuralforecast

or

conda install -c conda-forge neuralforecast

Vist our Installation Guide for further details.

Quick Start

Minimal Example

from neuralforecast import NeuralForecast
from neuralforecast.models import NBEATS
from neuralforecast.utils import AirPassengersDF

nf = NeuralForecast(
    models = [NBEATS(input_size=24, h=12, max_steps=100)],
    freq = 'M'
)

nf.fit(df=AirPassengersDF)
nf.predict()

Get Started with this quick guide.

Why?

There is a shared belief in Neural forecasting methods' capacity to improve forecasting pipeline's accuracy and efficiency.

Unfortunately, available implementations and published research are yet to realize neural networks' potential. They are hard to use and continuously fail to improve over statistical methods while being computationally prohibitive. For this reason, we created NeuralForecast, a library favoring proven accurate and efficient models focusing on their usability.

Features

Highlights

Missing something? Please open an issue or write us in Slack

Examples and Guides

The documentation page contains all the examples and tutorials.

πŸ“ˆ Automatic Hyperparameter Optimization: Easy and Scalable Automatic Hyperparameter Optimization with Auto models on Ray or Optuna.

🌑️ Exogenous Regressors: How to incorporate static or temporal exogenous covariates like weather or prices.

πŸ”Œ Transformer Models: Learn how to forecast with many state-of-the-art Transformers models.

πŸ‘‘ Hierarchical Forecasting: forecast series with very few non-zero observations.

πŸ‘©β€πŸ”¬ Add Your Own Model: Learn how to add a new model to the library.

Models

See the entire collection here.

Missing a model? Please open an issue or write us in Slack

How to contribute

If you wish to contribute to the project, please refer to our contribution guidelines.

References

This work is highly influenced by the fantastic work of previous contributors and other scholars on the neural forecasting methods presented here. We want to highlight the work of Boris Oreshkin, Slawek Smyl, Bryan Lim, and David Salinas. We refer to Benidis et al. for a comprehensive survey of neural forecasting methods.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

azul
azul

πŸ’» 🚧
Cristian Challu
Cristian Challu

πŸ’» 🚧
JosΓ© Morales
JosΓ© Morales

πŸ’» 🚧
mergenthaler
mergenthaler

πŸ“– πŸ’»
Kin
Kin

πŸ’» πŸ› πŸ”£
Greg DeVos
Greg DeVos

πŸ€”
Alejandro
Alejandro

πŸ’»
stefanialvs
stefanialvs

🎨
Ikko Ashimine
Ikko Ashimine

πŸ›
vglaucus
vglaucus

πŸ›
Pietro Monticone
Pietro Monticone

πŸ›

This project follows the all-contributors specification. Contributions of any kind welcome!