User:Joal/FBProphet

From Wikitech

This page documents the test I did using Facebook Prophet on project-view data.

Setup

I used SWAP (previsouly PAWS-Internal) to code the thing.

Two set of packages need to be installed for my example to run:

  • Packages to access Hive and load it's data into Pandas dataframe
pip install six bit_array thriftpy thrift_sasl sasl impyla pandas numpy matplotlib scipy
  • Packages to have Facebook Prophet running
pip install cython pystan fbprophet

Code

If you read this section, it probably mean you're able to find the code on SWAP and copy it for you:

cp /home/joal/prophet_projectcounts.ipynb ~/

You now should have a new notebook named prophet_projectcounts .

Findings

  • Prophet is incredibly easy to use!!! Follow the tutorial, and have fun!
  • It works!
    • Learning data: 8.5 years of daily pagecounts (log value)
    • Prediction: one year of daily (2016-08 to 2017-08)
    • Correcting definition between pagecounts and pageviews --> Taking the average daily difference from predicted value and real pageviews, and substracting this average-diff from the daily predicted value
    • Plot predicted value vs pageviews:
  • It seems to work better for english than for french -- Training data is less regular, so it might come frm that, but I also wonder if it couldn't come from the inner-time-based model based on US events (holidays etc).