11 — Advanced Models

Prophet#

Advanced✓ Mathematical
◆ The PatternDecomposable forecasting at scale

Facebook’s Prophet fits an additive model: y(t) = g(t) + s(t) + h(t) + ε. The trend g(t) can be linear or logistic (saturating). Seasonality s(t) uses Fourier series. Holidays h(t) handle irregular events. Changepoints are detected automatically.

y(t) = g(t) + s(t) + h(t) + εt
g(t) = trend (linear/logistic), s(t) = seasonality (Fourier), h(t) = holidays/events. All components are interpretable.
// Interactive — Prophet component decomposition
# Python — Prophet
from prophet import Prophet

model = Prophet(
    changepoint_prior_scale=0.05,
    seasonality_mode='additive'
)
model.fit(df[['ds', 'y']])
future = model.make_future_dataframe(periods=365)
forecast = model.predict(future)
model.plot_components(forecast)
Pattern bridge: Prophet’s Fourier seasonality connects to Fourier transforms in ML Math. Its trend changepoints are exactly the changepoint detection problem — and in markets, they correspond to breakout moments.
← Previous
Exponential Smoothing
Open in the full reader, with the topic sidebar →