Prophet Forecasting

Prophet is an open-source forecasting library from Facebook, now Meta, built around a decomposable model of a series as trend plus seasonality plus holiday effects. Hyndman and Athanasopoulos classify it in one phrase that explains most of its behavior: “Prophet can be considered a nonlinear regression model”, of the form

\[ y_t = g(t) + s(t) + h(t) + \varepsilon_t \]

where \(g(t)\) “describes a piecewise-linear trend (or ‘growth term’)”, \(s(t)\) “describes the various seasonal patterns”, \(h(t)\) “captures the holiday effects”, and \(\varepsilon_t\) is a white noise error term.

A curve fit, not a time-series model

That classification is the difference from ARIMA, and it is a difference in kind rather than in complexity. ARIMA models how an observation depends on recent observations and recent errors. Prophet models the observation as a function of the clock: a trend curve in \(t\), seasonal terms in \(t\), holiday indicators at known dates. Nothing in the model says today resembles yesterday except through those shared calendar terms.

Several consequences follow directly. Missing observations are easy, because there is no dependence on the previous row โ€” the regression simply has fewer points. Irregular spacing is likewise fine. Outliers can be dropped without breaking anything. And residual autocorrelation is not modeled at all, which is the source of its most concrete weakness: on an electricity demand example, Hyndman and Athanasopoulos observe that “the prediction intervals would be narrower if the autocorrelations were taken into account”. Structure the model does not capture ends up in the error term and is then treated as independent noise, so the intervals describe the wrong uncertainty.

What the pieces do

ComponentHow it is built
Trend \(g(t)\)Piecewise linear, with knots โ€” changepoints โ€” “automatically selected if not explicitly specified”. A logistic function can optionally set an upper bound, for growth with a ceiling
Seasonality \(s(t)\)Fourier terms of the relevant periods. “By default, order 10 is used for annual seasonality and order 3 is used for weekly seasonality”
Holidays \(h(t)\)“Added as simple dummy variables”, from a list the analyst supplies
EstimationA Bayesian approach, which is what allows changepoints and other characteristics to be selected automatically

The Fourier order is the main lever on how wiggly a seasonal pattern is allowed to be, and the holiday list is where domain knowledge enters โ€” Black Friday, a national holiday, a product launch. Both are deliberate: the parameters are meant to be adjusted by hand.

The same source states the conditions under which it does well: “it works best with time series that have strong seasonality and several seasons of historical data”. Not much seasonality, or fewer than a few repetitions of it, and the model has little to fit.

Accuracy in the two FPP3 comparisons

The natural question is whether it forecasts well. On the two comparisons in FPP3 it did not forecast best, and that is what can be said โ€” two datasets are not a general ranking. After comparing it with ARIMA and ETS on a quarterly series and with a harmonic regression model on half-hourly electricity demand, Hyndman and Athanasopoulos conclude: “Prophet has the advantage of being much faster to estimate than the DHR models we have considered previously, and it is completely automated. However, it rarely gives better forecast accuracy than the alternative approaches, as these two examples have illustrated.”

It is worth noting which comparison that is. The usual criticism of Prophet in practitioner writing is that deep sequence models beat it on complex patterns. The finding above is narrower and more useful: on those two series, classical statistical methods that have existed for decades gave better accuracy. Note that the same passage credits Prophet on the other axis โ€” it is “much faster to estimate than the DHR models” it was compared with โ€” so this is an accuracy result, not a claim that the classical methods are cheaper to run. Any evaluation that pits Prophet only against neural approaches has skipped the benchmarks that matter โ€” see naรฏve baseline forecast.

What it was actually built for

Forecast accuracy is part of Prophetโ€™s purpose, alongside scalable forecasting and analyst control. Evaluate these goals together rather than using accuracy alone to describe its design. Taylor and Letham describe the approach as “a combination of configurable models and thorough analyst-in-the-loop performance analysis”, built around “a decomposable model with interpretable parameters that can be intuitively adjusted by the analyst”.

Their motivation is two observations about organizations rather than about statistics. First, “completely automatic forecasting techniques can be brittle and they are often too inflexible to incorporate useful assumptions or heuristics”. Second, “analysts who can produce high quality forecasts are quite rare because forecasting is a specialized data science skill requiring substantial experience”. The model is designed to be “configurable by non-experts who may have domain knowledge about the data generating process but little knowledge about time series models and methods”.

Read that way, the design choices line up. The components are separable because a person needs to look at them and judge whether the trend or the seasonality is wrong. The parameters are interpretable because that person will adjust them. Holidays are an explicit input because domain knowledge usually arrives as a list of dates. The intended workflow is many forecasts, automatically evaluated, with the poor ones flagged for a human โ€” not one carefully specified model.

When to use it

SituationReasonable choice
Hundreds of business series, no time-series specialist, forecasts needed on a scheduleProphet, with automated evaluation and human review of the flagged ones
One important series, accuracy matters, a specialist is availableETS or ARIMA, benchmarked properly
Strong daily and weekly and annual seasonality at high frequencyA method built for multiple seasonal periods; Prophet handles several but was beaten here
Known future drivers โ€” price, promotion, weatherA regression with those covariates; Prophet accepts extra regressors but has no special advantage
Short history, or fewer than a few repetitions of the seasonal cycleSimple benchmarks; there is not enough to fit

Two operational cautions worth keeping. Because it is a curve fit, a trend extrapolated past the last changepoint can run away over long horizons, and the logistic bound exists precisely for that โ€” set it when the quantity has a ceiling. Note what it bounds: cap and floor saturate the trend component. Seasonal terms, holidays and extra regressors are added on top, so the final yhat can sit outside the band. A hard physical limit on the output needs a transformation, a different likelihood, or clipping after the fact. And because the error term is white noise by assumption, the intervals should be checked against realized coverage on held-out data rather than taken at their nominal level, which is the general advice under time series forecasting.

References


Discover more from Insightful Data Lab

Subscribe to get the latest posts sent to your email.

Similar Posts

One Comment

Questions, corrections, or additional insights?

This site uses Akismet to reduce spam. Learn how your comment data is processed.