facebook / facebook/prophet

Does warm start take more time to predict? (using weekly data)

未关闭
#1,853 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
20.4k
派生
4.6k
平均合并
19 小时 52 分钟
30 天内合并 PR
1

描述

Working on weekly data to predict for the next 1 week and I observed that warm-start takes more time to predict (and even fitting at times).? Is it normal or something to do with the code or data?

with open('serialized_model.json', 'r') as fin:
m1 = model_from_json(json.load(fin))

m2 = Prophet(weekly_seasonality=True, yearly_seasonality='auto', n_changepoints=30,
daily_seasonality=True, seasonality_mode = 'multiplicative', changepoint_prior_scale=0.1, changepoint_range= 0.6)

m2.fit(train_df, init=stan_init(m1))
future = m2.make_future_dataframe(periods=1, freq = "W")

forecast = m2.predict(future)

res = forecast.tail(1).yhat.values[0]

#out.append(res)
train_df = train_df.append(df.iloc[count+106])


m2.fit_kwargs['init']['delta'] = m2.fit_kwargs['init']['delta'].tolist()
m2.fit_kwargs['init']['beta'] = m2.fit_kwargs['init']['beta'].tolist()
with open('serialized_model.json', 'w') as fout:
json.dump(model_to_json(m2), fout)

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。