Prophet
Forecasting at Scale
Sean J. Taylor and Ben Letham Facebook / Core Data Science
Prophet Forecasting at Scale Sean J. Taylor and Ben Letham Facebook - - PowerPoint PPT Presentation
Prophet Forecasting at Scale Sean J. Taylor and Ben Letham Facebook / Core Data Science Outline Motivation and requirements Review of forecasting methods Curve-fitting as forecasting Uncertainty estimation Tuning parameters
Sean J. Taylor and Ben Letham Facebook / Core Data Science
https://xkcd.com/605/
require forecasts.
be forecast numerous times (e.g. for each country)
forecasting training or experience.
tools.
Capacity planning
spaces, etc., are we going to need? Goal setting
we did nothing at all? Anomaly detection
problem or because it’s a holiday in Brazil? Stuff we haven’t thought of yet
data pipelines.
Often people train for:
predictive models
graph data
relatively constrained class of models.
complex forecasting problems which can benefit from most advanced approaches (e.g. LSTMs).
by making forecasting quick, simple, and repeatable for human analysts to use.
making the tool easy to use for beginners with a path to improve models for experts.
Cumulative share of applications from lowest to highest complexity Cumulative share
(semi) automate forecasting
forecasting problems
everyone to use it
forecasts
Python API
>>> from fbprophet import Prophet >>> m = Prophet() >>> m.fit(data) >>> future = m.make_future_dataframe(periods=365) >>> forecast = m.predict(future)
(a probabilistic programming language).
ε0 ε1 ε2 X1 X0 X2 ε0 ε1 ε2 X1 X0 X2 ε0 ε1 ε2 X1 X0 X2 ε0 ε1 ε2 X1 X0 X2
White noise AR(1) ARMA(1,1) MA(1)
models with no integration (initial differencing step).
correspond to any human- interpretable properties of the time series.
Xt =
p
∑
i=1
αiXt−i +
q
∑
i=1
θqϵt−q + ϵt
ARMA(p,q)
seasonalities
“Curve Fitting by Segmented Straight Lines” Bellman and Roth (1969)
choice for fitting curves.
the polynomial.
extrapolation.
polynomial curves.
interpolation error than polynomials with fewer terms.
uses is piecewise linear.
and tend to extrapolate well.
which “knots” or changepoints to use.
changepoints.
curve to change its slope.
(equivalent to L1-penalty) to changes to select simpler curves.
using a prior scale that is an input to the procedure.
fewer changepoints and less flexible curves.
not vary much!
approximate an arbitrary periodic signal.
, we generate N pairs
periodic equation:
data.
s(t) =
N
∑
n=1 (an cos (
2πnt P ) + bn sin ( 2πnt P ))
Three sources of uncertainty:
modeled as mean-zero i.i.d. random noise.
uncertainty in the forecast.
model has fit the historical data poorly.
the model has sampling variance.
trends, and changepoints.
built in HMC implementation to sample draws from posterior.
Credit: Thomas Wiecki
trend change distribution
future trends
allow the trend to change.
estimated based on how many changepoints were selected.
selected based on their magnitudes.
If you run a forecasting procedure and you don’t like the forecast what can you?
supply.
spreadsheet.
used for your model.
changepoints in the model.
(tube shaped)
uncertainty (cone shaped)
the Fourier expansion.
be controlled by turning off various types of seasonal patterns or using fewer Fourier terms.
curves have a capacity parameter that we do not fit from data.
constraints as upper and lower bounds on forecasts.
capacity as a constant or as a time series.
modeled by smooth curves.
these to allow custom dates.
holidays for dozens of countries.
technology problem 75% people problem.
tricks) but covers many important use- cases at Facebook and elsewhere.
and fails in understandable ways.
parameters allows users to input their domain knowledge into forecasts.
Try out Prophet! https://facebook.github.io/prophet/
when it doesn’t work well. Contribute to the project!
Read our paper!
(The American Statistician) https://peerj.com/preprints/3190/