Nixtla/neuralforecast

Scalable and user friendly neural :brain: forecasting algorithms.

NeuralForecast – A Python library for modern time‑series forecasting

What it is – NeuralForecast is an open‑source Python package that bundles more than 30 state‑of‑the‑art neural‑network models for time‑series forecasting. It aims to make these models as easy to use as scikit‑learn: you create a NeuralForecast object, call .fit() on a dataframe of historic series, and then call .predict().

Key capabilities

  • Model zoo – RNN‑style nets (MLP, LSTM, GRU, RNN, TCN), classic forecasting nets (N‑BEATS, N‑BEATSx, NHITS, DeepAR, TiDE, etc.), and many recent transformer‑based architectures (TimesNet, TFT, Informer, PatchTST, TimeLLM, …). The README lists over 30 concrete classes.
  • Exogenous & static covariates – you can feed additional regressors (e.g., weather, price) alongside the target series.
  • Probabilistic output – adapters let you train with quantile losses or parametric distributions, giving prediction intervals.
  • Interpretability – utilities to extract trend, seasonality and the effect of exogenous variables.
  • Automatic hyper‑parameter tuning – built‑in wrappers for Ray or Optuna let the library run distributed searches.
  • Model persistence – from version 3.3.0 models are saved as a directory containing safetensors weights and JSON metadata, avoiding unsafe pickle loading.
  • Compatibility – works with the related StatsForecast, MLForecast, HierarchicalForecast, utilsforecast and coreforecast ecosystems, and follows a familiar sklearn‑style API.

Typical workflow (from the README)

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)
forecast = nf.predict()

The library also provides utilities for loading data, visualising results, and adding custom models.

Why it matters – Neural networks have shown promise for improving forecast accuracy, but existing implementations are often fragmented, hard to use, or computationally heavy. NeuralForecast consolidates vetted, efficient implementations and adds tooling (hyper‑parameter search, interpretability, safe model storage) to lower the barrier for practitioners and researchers.

Installation – pip install neuralforecast or conda install -c conda-forge neuralforecast.

Documentation & community – Full docs, quick‑start guides, and a Slack community are linked from the README. The project is actively maintained (badge shows CI, recent releases on PyPI/conda) and welcomes contributions.


All information above is taken directly from the repository’s README.

Related

  • Project
  • Project
  • Project
  • Project
  • Project