Commit 6516832c authored by H.C.K. De Silva's avatar H.C.K. De Silva

Delete fbp.py

parent de338fda
from prophet import Prophet
import pandas as pd
import json
from prophet.serialize import model_to_json, model_from_json
df = pd.read_csv('temp.csv')
df.head()
m = Prophet()
m.fit(df)
future = m.make_future_dataframe(periods=7)
future.tail()
forecast = m.predict(future)
forecast[['ds', 'yhat', 'yhat_lower', 'yhat_upper']].tail()
print(forecast['yhat'][-7:])
with open('trained_models/serialized_model.json', 'w') as fout:
json.dump(model_to_json(m), fout) # Save model
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment