Is Facebook’s “Prophet” the Time-Series Messiah, or Just a Very Naughty Boy?

A debate rages on internet web page actually considered one of Hacker News about the deserves of the world’s most downloaded time-series library. Facebook’s Prophet package deal deal objectives to supply a straightforward, automated methodology to the prediction of a large number of completely totally different time assortment. The package deal deal employs an merely interpreted, three-component additive model whose Bayesian posterior is sampled using STAN. In distinction to a different approaches, the individual of Prophet could hope for good effectivity with out tweaking a lot of parameters. Instead, hyper-parameters administration how seemingly these parameters are a priori, and the Bayesian sampling tries to sort points out when information arrives.

Prophet’s Claims, and Lukewarm Reviews

The humorous issue is though, that ought to you poke spherical a little you’ll quickly come to the conclusion that few people who’ve taken the trouble to guage Prophet’s accuracy are gushing about its effectivity. The article by Hideaki Hayashi is significantly typical, insofar as a result of it tries to say good points nevertheless struggles. Yahashi notes that out-of-the-box, “Prophet is exhibiting a low-cost seasonal growth not like auto.arima, though the absolute values are sort of off from the exact 2007 information.” However, in the related breath, the creator observes that telling ARIMA to include a yearly cycle turns the tables. With that hint, ARIMA merely beats prophet in accuracy — not lower than on the one occasion he checked out.

Taking Prophet for a Spin

I began scripting this submit as a results of I was engaged on integrating Prophet into a Python package deal deal I identify time machines, which is my attempt to remove some ceremony from the use of forecasting packages. These vitality some bots that the prediction group (outlined at www.microprediction.com in case you’re ). How would possibly I not embrace the hottest time assortment package deal deal?

  • We identify m.match(df) after each information stage arrives, the place m is a beforehand instantiated Prophet model. There is not any totally different, as there is no notion of “advancing” a Prophet model with out refit.
  • We make a “future dataframe” referred to as forecast say, that has okay further rows, holding the events as soon as we’d like predictions to be made and likewise known-in-advance exogenous variables.
  • We identify m.predict(forecast) to populate the time interval development of predictions and confidence intervals.
  • We identify m.plot(forecast) and voila!

What’s Going On?

Perhaps we start by taking a take a look at a few of the additional daring Prophet predictions.

Reigning in Prophet for Better Accuracy

Now, having confirmed you in-sample information, let’s take a take a look at some examples with the truth revealed. You’ll see that a few of those wagers made by Prophet do pay out. For occasion, proper right here’s Prophet predicting the every single day cycle of train in bike sharing stations close to New York City hospitals. It does a good job of anticipating the dropoff, don’t you suppose?

  1. Construct an larger sure by together with m customary deviations to the highest information stage, plus a mounted. Similarly for a lower sure.
  2. If Prophet’s prediction is exterior these bounds, use a imply of the closing three information elements as a substitute.

An Ongoing Assessment, and Elo scores

I’ve begun a additional systematic analysis of Prophet, along with tweaks to the related. As with this submit, I’m using a number of completely totally different precise world time assortment and analyzing completely totally different forecast horizons. The Elo scores look like indicative of Prophet’s poor effectivity — though I’ll give them additional time to bake. However, besides points change my conclusions are:

  • In defending with a few of the cited work, I uncover that Prophet is crushed by exponential transferring averages at every horizon up to now (ranging from 1 step ahead to 34 steps ahead when expert on 400 historic information elements). More worrying, the transferring frequent fashions don’t calibrate. I merely arduous wired two selections of parameter.