Solved – How does facebook prophet handle missing data

forecastingmissing datapredictive-modelsprophettime series

The Prophet paper (forecasting at scale by SJ Taylor – 2017) says the following on missing data:

Unlike ARIMA models, the measurements do not need to be regularly
spaced, and we do not need to interpolate missing values e.g. from
removing outliers

But I want to know if prophet is not interpolate missing values, what does it do instead? How does it handle missing data?

Best Answer

Models like ARIMA are defined in terms of lagged variables, so you need the subsequent points. Prophet (Taylor and Letham, 2017) is defined in terms of regression-like model

$$ y(t) =g(t) +s(t) +h(t) + \varepsilon_t $$

where

$g(t)$ is the trend function which models non-periodic changes in the value of the time series, $s(t)$ represents periodic changes (e.g., weekly and yearly seasonality), and $h(t)$ represents the effects of holidays which occur on potentially irregular schedules over one or more days. The error term $\varepsilon_t$ represents any idiosyncratic changes which are not accommodated by the model; later we will make the parametric assumption that $\varepsilon_t$ is normally distributed.

The trend function $g(t)$ is defined in terms of piecewise regression, seasonality $s(t)$ uses Fourier terms, and holiday effects $s(t)$ are just dummies. None of the features needs you to have all the points, since if lacking information, it wouldn't use it to estimate anything, but will just interpolate between the known points. Saying it differently, if you have points $a < b < c$, but $b$ is unknown, then you can still fit the line (or curve) to $a$ and $c$ and interpolate for $b$. What Prophet does, it just fits many different lines (trend), curves (seasonalities) and constants (dummies) and combines them together.