Time series forecasting suite using statistical models
Project description
Nixtla
Statistical ⚡️ Forecast
Lightning fast forecasting with statistical and econometric models
StatsForecast offers a collection of widely used univariate time series forecasting models, including automatic ARIMA
and ETS
modeling optimized for high performance using numba
. It also includes a large battery of benchmarking models.
🔥 Highlights
-
Fastest and most accurate
auto_arima
inPython
andR
. -
Fastest and most accurate
ets
inPython
andR
. -
New!: Replace FB-Prophet in two lines of code and gain speed and accuracy. Check the experiments here.
-
New!: Distributed computation in clusters with ray. (Forecast 1M series in 30min)
-
New!: Good Ol' sklearn syntax with
AutoARIMA().fit(y).predict(h=7)
.
🎊 Features
-
Inclusion of
exogenous variables
andprediction intervals
for ARIMA. -
20x faster than
pmdarima
. -
1.5x faster than
R
. -
500x faster than
Prophet
. -
Compiled to high performance machine code through
numba
. -
Out of the box implementation of
ses
,adida
,historic_average
,croston_classic
,croston_sba
,croston_optimized
,seasonal_window_average
,seasonal_naive
,imapa
naive
,random_walk_with_drift
,window_average
,seasonal_exponential_smoothing
,tsb
,auto_arima
andets
.
Missing something? Please open an issue or write us in
📖 Why?
Current Python alternatives for statistical models are slow, inaccurate and don't scale well. So we created a library that can be used to forecast in production environments or as benchmarks. StatsForecast
includes an extensive battery of models that can efficiently fit millions of time series.
🔬 Accuracy & ⏲ Speed
ARIMA
The auto_arima
model implemented in StatsForecast
is 20x faster than pmdarima
and 1.5x faster than R
while improving accuracy. You can see the exact comparison and reproduce the results here.
ETS
The ets
model implemented in StatsForecast
is 4x faster than statsmodels
and 1.6x faster than R
while improving accuracy. You can see the exact comparison and reproduce the results here
Benchmarks at Scale
With StatsForecast
you can fit 9 benchmark models on 1,000,000 series in under 5 min. Reproduce the results here.
💻 Installation
PyPI
You can install the released version of StatsForecast
from the Python package index with:
pip install statsforecast
(Installing inside a python virtualenvironment or a conda environment is recommended.)
Conda
Also you can install the released version of StatsForecast
from conda with:
conda install -c conda-forge statsforecast
(Installing inside a python virtualenvironment or a conda environment is recommended.)
Dev Mode
If you want to make some modifications to the code and see the effects in real time (without reinstalling), follow the steps below:git clone https://github.com/Nixtla/statsforecast.git
cd statsforecast
pip install -e .
🧬 Getting Started
You can run this notebooks to get you started.
-
Example of different
auto_arima
models on M4 data- In this notebook we present Nixtla's
auto_arima
. Theauto_arima
model is widely used to forecast time series in production and as a benchmark. However, the alternative python implementation (pmdarima
) is so slow that prevents data scientists from quickly iterating and deployingauto_arima
in production for a large number of time series.
- In this notebook we present Nixtla's
-
Benchmarking 9 models on millions of series.
📖 Documentation (WIP)
Here is a link to the documentation.
🔨 How to contribute
See CONTRIBUTING.md.
📃 References
- The
auto_arima
model is based (translated) from the R implementation included in the forecast package developed by Rob Hyndman. - The
ets
model is based (translated) from the R implementation included in the forecast package developed by Rob Hyndman.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
fede 💻 |
José Morales 💻 🚧 |
Sugato Ray 💻 |
Jeff Tackes 🐛 |
darinkist 🤔 |
Alec Helyar 💬 |
Dave Hirschfeld 💬 |
mergenthaler 💻 |
Kin 💻 |
Yasslight90 🤔 |
asinig 🤔 |
Philip Gillißen 💻 |
Sebastian Hagn 🐛 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for statsforecast-0.6.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24e764eb0f638a68b11a711025e4094619ce8949335fad890d1ff41668d3dc4f |
|
MD5 | e18df8fb3a7ce5d54d9d755b0c77f935 |
|
BLAKE2b-256 | db11fb5748065fee56d8bc28a7c75448a8f370786718a2ba3efdb2c1c7d3ccc4 |