在先知中添加额外的回归器 [英] Adding extra regressor in Prophet
问题描述
我希望我能找到一种提出问题的方法.我有一家拥有3-4年历史的商店收入数据.我的目标是预测未来两个月.我正在尝试通过先知来实现这一目标,到目前为止一切进展顺利.我有一个回归指标,可以用来改善预测,但是我不确定如何最好地使用它.我的管理员是对商店收入的不同影响程度,其中1等于没有影响,例如1,20等于那一天增加了20%. 0,8表示收入将减少20%.我该如何以最佳方式将这种信息适合我的模型?
I hope I'll find a way to ask a question. I have data of a store's income with a 3-4 year history. My goal is to forecast next two months. I'm trying to achieve this with prophet, and so far it's going well. I have a regressor I want to use to improve my forecast but I'm not sure how to use it the best way I can. My regresor is different levels of impact on the stores income where 1 equals no impact, and 1,20 for example equals, 20 percent increase on that day. 0,8 would mean that there would be 20 percent decrease on income. How could I fit that kind of information in the best way to my model?
谢谢.
推荐答案
应该直接.您将使用在此处记录的add_regressors()函数( https://facebook.github .io/prophet/docs/seasonality_and_holiday_effects.html ).如果您在同一时间序列级别上具有回归项(一列为影响"),则可以通过以下方式将其添加(在R中):
Should be straight forward. You'd use the add_regressors() function, documented here (https://facebook.github.io/prophet/docs/seasonality_and_holiday_effects.html). If you have your regression term (a column say 'impact') at the same time series level, you'd add it (in R) by doing:
m <- prophet()
add_regressor(m = m,
name = 'impact')
m <- fit.prophet(m = m, df = <your_dataframe_here>)
这篇关于在先知中添加额外的回归器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!