Neuralforecast
Scalable and user friendly neural :brain: forecasting algorithms.
Install / Use
/learn @Nixtla/NeuralforecastREADME
Nixtla
<div align="center"> <img src="https://raw.githubusercontent.com/Nixtla/neuralforecast/main/nbs/imgs_indx/logo_new.png" /> <h1 align="center">Neural 🧠 Forecast</h1> <h3 align="center">User friendly state-of-the-art neural forecasting models</h3> <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --> <!-- ALL-CONTRIBUTORS-BADGE:END -->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 = 'ME'
)
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
- Fast and accurate implementations of more than 30 state-of-the-art models. See the entire collection here.
- Support for exogenous variables and static covariates.
- Interpretability methods for trend, seasonality and exogenous components.
- Probabilistic Forecasting with adapters for quantile losses and parametric distributions.
- Train and Evaluation Losses with scale-dependent, percentage and scale independent errors, and parametric likelihoods.
- Automatic Model Selection with distributed automatic hyperparameter tuning.
- Familiar sklearn syntax:
.fitand.predict.
Highlights
- Official
NHITSimplementation, published at AAAI 2023. See paper and experiments. - Official
NBEATSximplementation, published at the International Journal of Forecasting. See paper. - Unified with
StatsForecast,MLForecast, andHierarchicalForecastinterfaceNeuralForecast().fit(Y_df).predict(), inputs and outputs. - Built-in integrations with
utilsforecastandcoreforecastfor visualization and data-wrangling efficient methods. - Integrations with
RayandOptunafor automatic hyperparameter optimization. - Predict with little to no history using Transfer learning. Check the experiments here.
Missing something? Please open an issue or write us in
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
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.
🙏 How to cite
If you enjoy or benefit from using these Python implementations, a citation to the repository will be greatly appreciated.
@misc{olivares2022library_neuralforecast,
author={Kin G. Olivares and
Cristian Challú and
Azul Garza and
Max Mergenthaler Canseco and
Artur Dubrawski},
title = {{NeuralForecast}: User friendly state-of-the-art neural forecasting models.},
year={2022},
howpublished={{PyCon} Salt Lake City, Utah, US 2022},
url={https://github.com/Nixtla/neuralforecast}
}
Contributors ✨
Thanks goes to these wonderful people (emoji key):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tbody> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/AzulGarza"><img src="https://avatars.githubusercontent.com/u/10517170?v=4?s=100" width="100px;" alt="azul"/><br /><sub><b>azul</b></sub></a><br /><a href="https://github.com/Nixtla/neuralforecast/commits?author=AzulGarza" title="Code">💻</a> <a href="#maintenance-AzulGarza" title="Maintenance">🚧</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/cchallu"><img src="https://avatars.githubusercontent.com/u/31133398?v=4?s=100" width="100px;" alt="Cristian Challu"/><br /><sub><b>Cristian Challu</b></sub></a><br /><a href="https://github.com/Nixtla/neuralforecast/commits?author=cchallu" title="Code">💻</a> <a href="#maintenance-cchallu" title="Maintenance">🚧</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/jmoralez"><img src="https://avatars.githubusercontent.com/u/8473587?v=4?s=100" width="100px;" alt="José Morales"/><br /><sub><b>José Morales</b></sub></a><br /><a href="https://github.com/Nixtla/neuralforecast/commits?author=jmoralez" title="Code">💻</a> <a href="#maintenance-jmoralez" title="Maintenance">🚧</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/mergenthaler"><img src="https://avatars.githubusercontent.com/u/4086186?v=4?s=100" width="100px;" alt="mergenthaler"/><br /><sub><b>mergenthaler</b></sub></a><br /><a href="https://github.com/Nixtla/neuralforecast/commits?author=mergenthaler" title="Documentation">📖</a> <a href="https://github.com/NiRelated Skills
YC-Killer
2.7kA library of enterprise-grade AI agents designed to democratize artificial intelligence and provide free, open-source alternatives to overvalued Y Combinator startups. If you are excited about democratizing AI access & AI agents, please star ⭐️ this repository and use the link in the readme to join our open source AI research team.
flutter-tutor
Flutter Learning Tutor Guide You are a friendly computer science tutor specializing in Flutter development. Your role is to guide the student through learning Flutter step by step, not to provide d
groundhog
398Groundhog's primary purpose is to teach people how Cursor and all these other coding agents work under the hood. If you understand how these coding assistants work from first principles, then you can drive these tools harder (or perhaps make your own!).
last30days-skill
16.9kAI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary
