AutoArima is faster and more accurate than FB-Prophet in most cases. Replace it with two lines of code.We benchmarked on more than 100K series and show that you can improve MAPE and sMAPE forecast accuracy by 17% and 15% with 37x less computational time. Now you can replace Prophet with two lines of code and verify it for yourself.
Install StatsForecast
Replace FB-Prophet to make your forecast a lot faster
We respected the original Prophet syntax so your pipeline won’t get affected.Results on M3, M4, Tourism and Peyton Manning
Background
FB-Prophet is one of the world’s most used time series forecasting models. Its GitHub repository has more than 14 thousand stars, and more than a hundred repositories depend on it. However, in many scenarios, FB-Prophet does not offer good performance in terms of time and accuracy. This lacking performance suggests that the FB-Prophet’s success can be explained mainly by its usability. For example, adding exogenous and calendar variables is almost trivial. To contribute to the forecasting community, we created a FB-Prophet API adapter that lets you use Prophet’s useful methods without accuracy and computational downsides. Just import this AutoARIMAProphet adapter and replace the Prophet class to start using AutoARIMA in any of your existing pipelines.Empirical validation
To validate the AutoARIMAProphet adapter, we designed a pipeline considering the M3, M4, and Tourism datasets (standard benchmarks in the forecasting practice) and the Peyton Manning data set originally used by FB. The pipeline automatically selects ARIMA’s parameters with the AIC criterion and selects Prophet’s parameters with time-series cross-validation.Results
The following table shows the MAPE, sMAPE and Time (in minutes) AutoARIMA improvements on Prophet for each dataset.Reproducibility
-
Create a conda environment
arima_prophetusing theenvironment.ymlfile. -
Activate the conda environment using
-
Run the experiments for each dataset and each model using
For
M4, the groups areYearly,Monthly,Quarterly,Weekly,Daily, andHourly. ForM3, the groups areYearly,Monthly,Quarterly, andOther. ForTourism, the groups areYearly,Monthly, andQuarterly. Finally, forPeytonManningthe group isDaily. -
Evaluate the results using
Conclusion
- Be mindful on what you read on Towards Data Science.
- Always use strong baselines when forecasting.
- Quick and easy results are sometimes misleading.
- Simpler models are sometimes better.
- Facebook’s Prophet might be many things, but it’s definitely not a model for forecasting time series at scale.
Misc.
StatsForecastalso includes a variety of lightning fast baseline models.- If you really need to do forecast at scale, here we show how to forecast 1 million time series under 30 minutes using Ray.
- If you are interested in SOTA Deep Learning models, check
NeuralForecast.

