Skip to content

Instantly share code, notes, and snippets.

@gumdropsteve
Last active October 1, 2020 07:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gumdropsteve/9198ce55e6e298afab74d6199eb60231 to your computer and use it in GitHub Desktop.
Save gumdropsteve/9198ce55e6e298afab74d6199eb60231 to your computer and use it in GitHub Desktop.
# go through all parameter combos
for i in range(len(all_params)):
# create & fit model with given params combo
m = Prophet(daily_seasonality=False, **all_params[i]).fit(df)
# cross validate the model
df_cv = cross_validation(m,
horizon="365 days",
period="182.5 days",
initial="730 days",
parallel="dask")
df_p = performance_metrics(df_cv, rolling_window=1)
# pull rmse and add it to the list
rmses.append(df_p['rmse'].values[0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment