问题
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?
Thank you in advance.
回答1:
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>)
来源:https://stackoverflow.com/questions/49409043/adding-extra-regressor-in-prophet