Sitemap
The Startup

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +772K followers.

Follow publication

Facebook Prophet

Moto DEI
7 min readAug 22, 2020

--

What is Prophet?

Facebook Prophet official logo
Photo by Jake Hills on Unsplash

Table of Contents:

- Quick Start Code (in Python) with Default Option Setting

- Prophet Options Cheat Sheets And Use Examples

- Background Math of Prophet

- What Prophet Does Not Do

- End Note

Quick Start Code (in Python) with Default Option Setting

Default option setup of Prophet
Simplest quick start code of Prophet
Default code output plot
Dataframe ‘forecast’ with many predicted components

Prophet Options Cheat Sheets And Use Examples

Uncertainty Options / Trend Options / Holiday Options

Uncertainty Options / Trend Options / Holiday Options
Example using trend options and holiday options.
Results of the code

Seasonality Options

Seasonality Options
Result of the code

Adding Regressors / Model Diagnostics

Illustration of how “Rolling Origin” cross validation works (https://www.researchgate.net/figure/Forecast-on-a-rolling-origin-cross-validation_fig1_326835034); blue=training set, orange=validation set
Adding Regressors / Model Diagnostics
Results of the code

Background Math of Prophet

Trend portion
Seasonality portion
Holiday effect portion

What Prophet Does Not Do

Prophet does not allow non-Gaussian noise distribution (at the moment)

Prophet does not take autocorrelation on residual into account

‘y_lag’ is to represent y value in prior time stamp.
Adding y_lag as regressor looks giving WN residuals.

Prophet does not assume stochastic trend

End Note

--

--

The Startup
The Startup

Published in The Startup

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +772K followers.

Moto DEI
Moto DEI

Written by Moto DEI

Principal Engineer/Data Scientist and Actuary with 20 yrs exp in media, marketing, insurance, and healthcare. https://www.linkedin.com/in/moto-dei-358abaa/

Responses (2)