Benchmarking Facebook Prophet

Valeriy Manokhin, PhD, MBA, CQF
3 min readNov 28, 2021

Over the last year, I have written many posts explaining ๐˜๐—ต๐—ฎ๐˜ ๐—ณ๐—ฎ๐—ฐ๐—ฒ๐—ฏ๐—ผ๐—ผ๐—ธ #๐—ฝ๐—ฟ๐—ผ๐—ฝ๐—ต๐—ฒ๐˜ ๐—ถ๐˜€ ๐—ฎ ๐—ป๐—ผ๐—ป-๐—ฝ๐—ฒ๐—ฟ๐—ณ๐—ผ๐—ฟ๐—บ๐—ถ๐—ป๐—ด ๐—ณ๐—ผ๐—ฟ๐—ฒ๐—ฐ๐—ฎ๐˜€๐˜๐—ถ๐—ป๐—ด ๐—ฎ๐—น๐—ด๐—ผ๐—ฟ๐—ถ๐˜๐—ต๐—บ ๐˜๐—ต๐—ฎ๐˜ ๐—ป๐—ผ๐˜ ๐—ผ๐—ป๐—น๐˜† ๐—ฑ๐—ผ๐—ฒ๐˜€ ๐—ป๐—ผ๐˜ ๐˜„๐—ผ๐—ฟ๐—ธ ๐—ฎ๐—ฐ๐—ฟ๐—ผ๐˜€๐˜€ ๐—ฎ๐—ป๐˜† ๐—ฟ๐—ฒ๐—ฎ๐˜€๐—ผ๐—ป๐—ฎ๐—ฏ๐—น๐—ฒ ๐˜€๐—ฒ๐˜ ๐—ผ๐—ณ #๐˜๐—ถ๐—บ๐—ฒ๐˜€๐—ฒ๐—ฟ๐—ถ๐—ฒ๐˜€ ๐—ฑ๐—ฎ๐˜๐—ฎ๐˜€๐—ฒ๐˜๐˜€, but also ๐Ÿ†„๐Ÿ…ฝ๐Ÿ…ณ๐Ÿ…ด๐Ÿ†๐Ÿ…ฟ๐Ÿ…ด๐Ÿ†๐Ÿ…ต๐Ÿ…พ๐Ÿ†๐Ÿ…ผ๐Ÿ†‚ ๐Ÿ…ผ๐Ÿ…พ๐Ÿ†‚๐Ÿ†ƒ ๐Ÿ…พ๐Ÿ…ต ๐Ÿ…พ๐Ÿ†ƒ๐Ÿ…ท๐Ÿ…ด๐Ÿ† ๐Ÿ…ต๐Ÿ…พ๐Ÿ†๐Ÿ…ด๐Ÿ…ฒ๐Ÿ…ฐ๐Ÿ†‚๐Ÿ†ƒ๐Ÿ…ธ๐Ÿ…ฝ๐Ÿ…ถ ๐Ÿ…ฐ๐Ÿ…ป๐Ÿ…ถ๐Ÿ…พ๐Ÿ†๐Ÿ…ธ๐Ÿ†ƒ๐Ÿ…ท๐Ÿ…ผ๐Ÿ†‚. More importantly, as explained in several posts, developers can not rectify such issues as Facebook prophet contains pathological flaws inherent in the prophetโ€™s design itself.

Whilst academic research papers have highlighted performance issues with the prophet since 2017, the propagation of package popularity through the data science community has been fueled by ๐™—๐™ค๐™ฉ๐™ ๐™š๐™ญ๐™˜๐™š๐™จ๐™จ๐™ž๐™ซ๐™š ๐™˜๐™ก๐™–๐™ž๐™ข๐™จ ๐™›๐™ง๐™ค๐™ข ๐™ฉ๐™๐™š ๐™ค๐™ง๐™ž๐™œ๐™ž๐™ฃ๐™–๐™ก ๐™™๐™š๐™ซ๐™š๐™ก๐™ค๐™ฅ๐™ข๐™š๐™ฃ๐™ฉ ๐™ฉ๐™š๐™–๐™ข ๐™—๐™ช๐™ฉ ๐™ข๐™ค๐™ง๐™š ๐™ž๐™ข๐™ฅ๐™ค๐™ง๐™ฉ๐™–๐™ฃ๐™ฉ๐™ก๐™ฎ ๐™—๐™ฎ ๐™ข๐™–๐™ง๐™ ๐™š๐™ฉ๐™ž๐™ฃ๐™œ ๐™ค๐™› ๐™ฉ๐™๐™š ๐™ฃ๐™ค๐™ฃ-๐™ฅ๐™š๐™ง๐™›๐™ค๐™ง๐™ข๐™ž๐™ฃ๐™œ ๐™ฅ๐™–๐™˜๐™ ๐™–๐™œ๐™š ๐™ซ๐™ž๐™– ๐™–๐™ง๐™ฉ๐™ž๐™˜๐™ก๐™š๐™จ ๐™ค๐™ฃ ๐™ˆ๐™š๐™™๐™ž๐™ช๐™ข ๐™–๐™ฃ๐™™ ๐™จ๐™ค๐™˜๐™ž๐™–๐™ก ๐™ข๐™š๐™™๐™ž๐™–.

Pip install prophet โ€” the solution to any forecasting accuracy issue

Therefore, it was interesting to test the inflated claims made by some of such articles. In the Medium article https://towardsdatascience.com/predicting-the-future-with-facebook-s-prophet-bdfe11af10ff, the author went so far as to claim that #facebookprophet can โ€˜predict the future and used the package to predict Medium stats.

With several quality #forecasting packages released over the past year, it is relatively easy for anyone to test such claims by running simple algorithms in #PyCaretโ€™s time series over the same simple dataset of the Medium writerโ€™s stats.

In the first test above, false prophet failed to outperform many simple algorithms on ALL point benchmarks such as MAE, RMSE, MAPE and SMAPE. Elementary methods such as linear regression, Lasso and KNN easily beat prophet.

More importantly, in terms of probabilistic forecasting, prophet ๐™ž๐™จ ๐™š๐™ซ๐™š๐™ฃ ๐™ฌ๐™ค๐™ง๐™จ๐™š ๐™–๐™จ ๐™ž๐™ฉ ๐™ฅ๐™ง๐™ค๐™ซ๐™ž๐™™๐™š๐™จ ๐™ž๐™ฃ๐™˜๐™ค๐™ง๐™ง๐™š๐™˜๐™ฉ ๐™–๐™ฃ๐™™ ๐™œ๐™ง๐™ค๐™จ๐™จ๐™ก๐™ฎ ๐™ข๐™ž๐™จ๐™ก๐™š๐™–๐™™๐™ž๐™ฃ๐™œ โ€˜๐™ฅ๐™ง๐™š๐™™๐™ž๐™˜๐™ฉ๐™ž๐™ค๐™ฃ ๐™ž๐™ฃ๐™ฉ๐™š๐™ง๐™ซ๐™–๐™ก๐™จโ€™. A well-calibrated probabilistic predictor will output a prediction interval covering 90%โ€“95% of the points. In this plot produced on a relatively simple and reasonably stable dataset, facebook prophet had 30%-40% points NOT covered by what is supposed to be โ€˜good prediction intervals.โ€™ One can make only one conclusion โ€” facebook prophet is a grossly inaccurate point predictor. It also produces wildly inaccurate PIs (prediction intervals), leaving users at risk of making wrong decisions, especially in critical, high-stakes applications.

One can argue that the Medium views data in March-19 were somewhat unstable, so prophet was given another test drive on Feb-19 data that is more stable.

As expected, it has failed to outperform other relatively simple forecasting algorithms. And again, it had produced terrible probabilistic predictions.

One has to question the utility of an algorithm that produces wildly inaccurate point and grossly inaccurate probabilistic predictions, making it extremely risky to use in any decision-making.

--

--

Valeriy Manokhin, PhD, MBA, CQF
Valeriy Manokhin, PhD, MBA, CQF

Written by Valeriy Manokhin, PhD, MBA, CQF

Principal Data Scientist, PhD in Machine Learning, creator of Awesome Conformal Prediction ๐Ÿ‘Tip: hold down the Clap icon for up x50

Responses (1)