Last active
August 4, 2019 12:40
-
-
Save Diyago/9b75588b6196311649df9b9abc8bb85a to your computer and use it in GitHub Desktop.
fit Prophet.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fit_predict_model(dataframe, interval_width = 0.99, changepoint_range = 0.8): | |
m = Prophet(daily_seasonality = False, yearly_seasonality = False, weekly_seasonality = False, | |
seasonality_mode = 'multiplicative', | |
interval_width = interval_width, | |
changepoint_range = changepoint_range) | |
m = m.fit(dataframe) | |
forecast = m.predict(dataframe) | |
forecast['fact'] = dataframe['y'].reset_index(drop = True) | |
return forecast | |
pred = fit_predict_model(df1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment