Skip to main content

Prophet

Prophet is an open-source time-series forecasting algorithm developed by Facebook. It is suitable for series with clear seasonality, holiday effects, and trend changes. Prophet is robust to missing values and outliers, automatically detects periodic patterns, and supports custom seasonality and holiday parameters. Unlike ARIMA, it does not require a fully stationary series and can model yearly, weekly, and daily seasonalities.

The model consists of:

  • A trend component with linear or saturating growth and changepoints.
  • A seasonality component fitted with Fourier series.
  • A holiday component for custom holidays or events.

Parameters

ParameterDescriptionRequired
growthTrend type: linear or logistic. Default: linearNo
yearly_seasonalityEnable yearly seasonality: true, false, or auto. Default: autoNo
weekly_seasonalityEnable weekly seasonality: true, false, or auto. Default: autoNo
daily_seasonalityEnable daily seasonality: true, false, or auto. Default: autoNo
changepoint_prior_scaleTrend-changepoint flexibility. Larger values allow more variation. Default: 0.05No

Example

Forecast the daily passengers series with yearly and weekly seasonality and a changepoint prior scale of 0.1:

SELECT _frowts,
FORECAST(passengers, "algo=prophet,growth=linear,yearly_seasonality=true,weekly_seasonality=true,changepoint_prior_scale=0.1")
FROM air;

The model result uses the following fields:

{
"rows": fc_rows,
"algo": "prophet",
"growth": "linear",
"yearly_seasonality": "auto",
"weekly_seasonality": "auto",
"daily_seasonality": "auto",
"changepoint_prior_scale": 0.05,
"mse": mse,
"res": res
}

References

  1. Prophet documentation
  2. Forecasting at Scale (2017)