我有每单位时间的疾病病例数的数据,以便我可以预测疫情。我使用了Facebook Prophet的plot_components函数从数据中提取基本趋势,Prophet可以很容易地做到这一点:
model = Prophet()
model.fit(df)
future = model.make_future_dataframe(periods=0)
forecast = model.predict(future)
model.plot_components(forecast)这让我意外地得到了this图。
我需要这些xy值用于我的分析,但我无法弄清楚。Prophet的文档没有帮助,也没有深入研究github上的源代码。在返回值的figure对象上似乎也没有可调用的方法或属性。
如果有任何想法,我们将不胜感激!
发布于 2019-12-08 13:02:26
你把它放在预测数据框中(检查“每周”栏)
https://stackoverflow.com/questions/57778723
复制相似问题