Skip to main content

GitHub release (latest SemVer) Pypi_Version Python Version Code style: black License Tests codecov Slack Downloads

NP-logo-wide_cut

Please note that the project is still in beta phase. Please report any issues you encounter or suggestions you have. We will do our best to address them quickly. Contributions are very welcome!

NeuralProphet: human-centered forecasting

NeuralProphet is an easy to learn framework for interpretable time series forecasting. NeuralProphet is built on PyTorch and combines Neural Networks and traditional time-series algorithms, inspired by Facebook Prophet and AR-Net.

  • With a few lines of code, you can define, customize, visualize, and evaluate your own forecasting models.
  • It is designed for iterative human-in-the-loop model building. That means that you can build a first model quickly, interpret the results, improve, repeat. Due to the focus on interpretability and customization-ability, NeuralProphet may not be the most accurate model out-of-the-box; so, don't hesitate to adjust and iterate until you like your results.
  • NeuralProphet is best suited for time series data that is of higher-frequency (sub-daily) and longer duration (at least two full periods/years).

Documentation

The documentation page may not be entirely up to date. Docstrings should be reliable, please refer to those when in doubt. We are working on an improved documentation. We appreciate any help to improve and update the docs.

For a visual introduction to NeuralProphet, view this presentation.

Contribute

We compiled a Contributing to NeuralProphet page with practical instructions and further resources to help you become part of the family.

Community

Discussion and Help

If you have any questions or suggestion, you can participate in our community right here on Github

Slack Chat

We also have an active Slack community. Come and join the conversation!

Tutorials

Open All Collab

There are several example notebooks to help you get started.

You can find the datasets used in the tutorials, including data preprocessing examples, in our neuralprophet-data repository.

Please refer to our documentation page for more resources.

Minimal example

from neuralprophet import NeuralProphet

After importing the package, you can use NeuralProphet in your code:

m = NeuralProphet()
metrics = m.fit(df)
forecast = m.predict(df)

You can visualize your results with the inbuilt plotting functions:

fig_forecast = m.plot(forecast)
fig_components = m.plot_components(forecast)
fig_model = m.plot_parameters()

If you want to forecast into the unknown future, extend the dataframe before predicting:

m = NeuralProphet().fit(df, freq="D")
df_future = m.make_future_dataframe(df, periods=30)
forecast = m.predict(df_future)
fig_forecast = m.plot(forecast)

Install

You can now install neuralprophet directly with pip:

pip install neuralprophet

Install options

If you plan to use the package in a Jupyter notebook, we recommended to install the 'live' version:

pip install neuralprophet[live]

This will allow you to enable plot_live_loss in the fit function to get a live plot of train (and validation) loss.

If you would like the most up to date version, you can instead install directly from github:

git clone <copied link from github>
cd neural_prophet
pip install .

Note for Windows users: Please use WSL2.

Features

Model components

  • Autoregression: Autocorrelation modelling - linear or NN (AR-Net).
  • Trend: Piecewise linear trend with optional automatic changepoint detection.
  • Seasonality: Fourier terms at different periods such as yearly, daily, weekly, hourly.
  • Lagged regressors: Lagged observations (e.g temperature sensor) - linear or NN.
  • Future regressors: In advance known features (e.g. temperature forecast) - linear or NN.
  • Events: Country holidays & recurring custom events.
  • Global Modeling: Components can be local, global or 'glocal' (global + regularized local)

Framework features

  • Multiple time series: Fit a global/glocal model with (partially) shared model parameters.
  • Uncertainty: Estimate values of specific quantiles - Quantile Regression.
  • Regularize modelling components.
  • Plotting of forecast components, model coefficients and more.
  • Time series crossvalidation utility.
  • Model checkpointing and validation.

Coming soon:tm:

  • Cross-relation of lagged regressors.
  • Static metadata regression for multiple series
  • Logistic growth for trend component.

For a list of past changes, please refer to the releases page.

Cite

Please cite NeuralProphet in your publications if it helps your research:

@misc{triebe2021neuralprophet,
      title={NeuralProphet: Explainable Forecasting at Scale}, 
      author={Oskar Triebe and Hansika Hewamalage and Polina Pilyugina and Nikolay Laptev and Christoph Bergmeir and Ram Rajagopal},
      year={2021},
      eprint={2111.15397},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}

Many Thanks To Our Contributors:

About

NeuralProphet is an open-source community project, supported by awesome people like you. If you are interested in joining the project, please feel free to reach out to me (Oskar) - you can find my email on the NeuralProphet Paper.

Metadata

Release files for neuralprophet 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for neuralprophet 0.9.0
File Size Uploaded
neuralprophet-0.9.0.tar.gz 123.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for neuralprophet 0.9.0
File Interpreter ABI Platform
neuralprophet-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 269.7 kB

Release files / neuralprophet-0.9.0.tar.gz

Download URL neuralprophet-0.9.0.tar.gz
Size 123.9 kB
Tags Source
SHA-256 checksum
How to use checksums
06feb3d188e74f18b7febcbe2f349562cf69013ac8d85ab7674f2be4e3e0727e
BLAKE2b-256 checksum
How to use checksums
612e9633f283f5596cfd83ef509e21f5588a530e9a851e968fdc6b2810288ac8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.10.12 Linux/6.9.3-76060903-generic

Release files / neuralprophet-0.9.0-py3-none-any.whl

Download URL neuralprophet-0.9.0-py3-none-any.whl
Size 145.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b484cd27dc5865c5235133a42c05715960adb49297c18d092b3da78861a2bd0
BLAKE2b-256 checksum
How to use checksums
71a3a60eedc2c160f81e841bbfb1f3bd7cba2369ff04187614f732da667fd1c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.10.12 Linux/6.9.3-76060903-generic
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page