Nixtla

Neural 🧠 Forecast
User friendly state-of-the-art neural forecasting models
NeuralForecast offers a large collection of neural forecasting models focusing on their performance, usability, and robustness. The models range from classic networks like RNN to the latest transformers: MLP, LSTM, GRU,RNN,TCN, DeepAR, NBEATS, NBEATSx, NHITS, DLinear, NLinear,TFT, Informer, AutoFormer, FedFormer, PatchTST,StemGNN, and TimesNet.
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
- Fast and accurate implementations of
MLP,LSTM,GRU,RNN,TCN,DeepAR,NBEATS,NBEATSx,NHITS,DLinear,TFT,Informer,AutoFormer,FedFormer,PatchTST,StemGNN, andTimesNet. 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
| Model | Structure | Sampling | Point Forecast | Probabilistic Forecast | Exogenous features | Auto Model |
|---|---|---|---|---|---|---|
| LSTM | RNN | recurrent | ✅ | ✅ | ✅ | ✅ |
| GRU | RNN | recurrent | ✅ | ✅ | ✅ | ✅ |
| RNN | RNN | recurrent | ✅ | ✅ | ✅ | ✅ |
| DilatedRNN | RNN | recurrent | ✅ | ✅ | ✅ | ✅ |
| DeepAR | RNN | recurrent | ✅ | ✅ | ✅ | |
| TCN | CNN | recurrent | ✅ | ✅ | ✅ | ✅ |
| TimesNet | CNN | windows | ✅ | ✅ | ✅ | |
| DLinear | Linear | windows | ✅ | ✅ | ✅ | |
| MLP | MLP | windows | ✅ | ✅ | ✅ | ✅ |
| NBEATS | MLP | windows | ✅ | ✅ | ✅ | |
| NBEATSx | MLP | windows | ✅ | ✅ | ✅ | ✅ |
| NHITS | MLP | windows | ✅ | ✅ | ✅ | ✅ |
| TFT | Transformer | windows | ✅ | ✅ | ✅ | ✅ |
| Transformer | Transformer | windows | ✅ | ✅ | ✅ | ✅ |
| Informer | Transformer | windows | ✅ | ✅ | ✅ | ✅ |
| Autoformer | Transformer | windows | ✅ | ✅ | ✅ | ✅ |
| FEDFormer | Transformer | windows | ✅ | ✅ | ✅ | ✅ |
| PatchTST | Transformer | windows | ✅ | ✅ | ✅ | |
| StemGNN | GNN | multivariate | ✅ | ✅ |
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.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
fede 💻 🚧 |
Cristian Challu 💻 🚧 |
José Morales 💻 🚧 |
mergenthaler 📖 💻 |
Kin 💻 🐛 🔣 |
Greg DeVos 🤔 |
Alejandro 💻 |
stefanialvs 🎨 |
Ikko Ashimine 🐛 |
vglaucus 🐛 |
Pietro Monticone 🐛 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Metadata
Release files for neuralforecast 1.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| neuralforecast-1.7.0.tar.gz | 146.8 kB | Without provenance | Details for neuralforecast-1.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| neuralforecast-1.7.0-py3-none-any.whl | Python 3 | none | any | Details for neuralforecast-1.7.0-py3-none-any.whl |
Total release size: 345.8 kB
Release files / neuralforecast-1.7.0.tar.gz
| Download URL | neuralforecast-1.7.0.tar.gz |
|---|---|
| Size | 146.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22e9ff60089331072a75df7021370a9316e6b4c9e0225ade01eec1a68073b63f
|
|
BLAKE2b-256 checksum How to use checksums |
b5c2263fdb7235e51cd5963025c940723d98ba4f3130d9cec949a075cbdf08d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Release files / neuralforecast-1.7.0-py3-none-any.whl
| Download URL | neuralforecast-1.7.0-py3-none-any.whl |
|---|---|
| Size | 199.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
762d9a86c81b40db436041915a37440ce4cbe8e0c59f1489136c36f1ee9c9c1c
|
|
BLAKE2b-256 checksum How to use checksums |
ebb31e6d88fb2bf2d97e3225dc37429b57f87b2a5f842af459893f43bd9a1ee0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Security for neuralforecast 1.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.