Introduction
Prophet is a forecasting procedure developed by Meta's Core Data Science team. It is designed for business time series that exhibit strong seasonal patterns and have several seasons of historical data. Prophet is robust to missing data, shifts in trend, and large outliers.
What Prophet Does
- Fits additive or multiplicative models with trend, seasonality, and holiday components
- Handles missing values and outliers without manual preprocessing
- Detects changepoints in the trend automatically
- Supports sub-daily, daily, weekly, and yearly seasonality
- Provides uncertainty intervals for all forecasted values
Architecture Overview
Prophet decomposes a time series into three main components: a piecewise linear or logistic growth trend, a Fourier series for seasonality, and user-specified holiday effects. The model is fit using Stan (a probabilistic programming language) for MAP estimation by default, with full Bayesian inference available via MCMC sampling. The decomposable model structure allows analysts to inspect each component independently and tune parameters with domain knowledge.
Self-Hosting & Configuration
- Install with
pip install prophet(Python) orinstall.packages('prophet')(R) - Requires a DataFrame with columns
ds(datestamp) andy(metric) - Configure growth type (
linearorlogistic), changepoint sensitivity, and seasonality mode - Add custom seasonalities and holiday calendars via the API
- Runs entirely locally with no external service dependencies
Key Features
- Analyst-friendly: tunable by domain experts without deep statistics knowledge
- Fast fitting: most models train in seconds on years of daily data
- Built-in cross-validation and performance metrics (MAE, MAPE, RMSE)
- Automatic changepoint detection with configurable prior strength
- Available in both Python and R with identical APIs
Comparison with Similar Tools
- statsmodels (ARIMA/SARIMAX) — classical statistical models requiring stationarity assumptions; Prophet handles non-stationary data more naturally
- NeuralProphet — neural network extension of Prophet with auto-regression and lagged regressors; slower to train
- Darts — unified forecasting library supporting dozens of models; broader scope but more complex
- Kats — Meta's newer time series toolkit with anomaly detection and feature extraction; Prophet focuses purely on forecasting
- XGBoost/LightGBM — tree-based approaches that can outperform on tabular time series but require manual feature engineering
FAQ
Q: Does Prophet work with sub-daily data? A: Yes. Prophet supports timestamps at any granularity and will detect intra-day seasonality patterns automatically.
Q: How much historical data does Prophet need? A: At least one year of daily data is recommended for yearly seasonality. For weekly patterns, a few months can suffice.
Q: Can I add external regressors?
A: Yes. Use m.add_regressor() to include additional columns as linear regressors in the model.
Q: Is Prophet suitable for real-time streaming forecasts? A: Prophet is designed for batch forecasting. For streaming use cases, retrain periodically or combine with an online learning layer.