A Better (Facebook) Prophet
By: Thomas Oriol
Tags: Machine Learning, Prophet, Time Series Analysis, Forecasting, Facebook

Prophet is a forecasting (i.e. time-series specific) algorithm open-sourced by Facebook in February 2017, and belonging to the GAM family of algorithms.

Prophet was developed for typical Facebook issues, such as predicting user activity in different parts of their app, or prioritizing feature development. It is thus convenient for prediction challenges involving multiple seasonalities and special events (single-day events like Black Friday, or longer events like school holidays).

Prophet is relatively easy to use: it is available in R and Python, it is quite robust “out of the box” thanks to its automatic outlier filtering and parameter tuning capabilities, and its interface is straightforward.

These advantages explain why Prophet has become popular with data scientists working on demand prediction challenges. We would definitely recommend it as a first iteration, especially if your data is highly seasonal.

Notable downsides

Prophet was never meant to be an all-purpose predictive algorithm, and its downsides reflect its specialization.

If you need to predict hundreds or thousands of targets simultaneously, Prophet will compute slowly. You will need to adapt it to multivariate forecasting by coding multiple loops and storing multiple predictions. And Prophet won’t cross-learn potentially useful patterns from multiple targets.

simultaneously, Prophet will compute slowly. You will need to adapt it to multivariate forecasting by coding multiple loops and storing multiple predictions. And Prophet won’t cross-learn potentially useful patterns from multiple targets. If you have more meaningful features than just seasonality or special events , Prophet won’t help. That’s a big limitation in a lot of situations. Even plain-vanilla demand prediction challenges often involve a multi-level product hierarchy and some contextual data.

, Prophet won’t help. That’s a big limitation in a lot of situations. Even plain-vanilla demand prediction challenges often involve a multi-level product hierarchy and some contextual data. If you are exposed to unexpected changes in the underlying structure of your data (a very common risk with time series), you will need to manage Prophet’s relearning procedure manually. The hassle intensifies exponentially when you multiply data types, prediction targets and prediction horizons.

How to improve it

Here are a few suggestions for improving your implementation of Prophet:

You could automate Prophet’s relearning procedure to increase its resistance to changes in the underlying structure of your data.

to increase its resistance to changes in the underlying structure of your data. You could aggregate it with other, complementary predictive algorithms (e.g. LSTM, ARIMA) and use their best combined predictions.

(e.g. LSTM, ARIMA) and use their best combined predictions. You could also implement real GAM algorithms, that you could then tailor to your specific prediction challenge.

***

Visit the Datapred Blog for more posts on machine learning, streaming data and continuous intelligence applications, and this page for an extensive list of online resources on machine learning and time series.

Originally published at www.datapred.com.