TransWikia.com

How to run Facebook Prophet in Mathematica?

Mathematica Asked on August 11, 2021

I would like to use the Facebook Prophet API for timeseries forecasting in Mathematica.

I’m trying to make a function prophetM which takes a list of date, and integer pairs (or a Timeseries object), and returns a list of length N of date and integer pairs for N future periods.

An exmaple of the code in python is given below, where:

LIST_IMPORTED_FROM_MATHEMATICA = {{"2020-01",1},{"2020-02",2},{"2020-03",3},….}

(the data could also have a day, or be a DateObject[] — but that isn’t needed)

Would anyone have any idea how to do that?

Thanks!!

Exmaple python code:

import pandas as pd
from fbprophet import Prophet

df = LIST_IMPORTED_FROM_MATHEMATICA

m = Prophet()

m.fit(df)


future = m.make_future_dataframe(periods=N, freq='MS') 

forecast = m.predict(future)


```

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP