facebook / prophet

Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth.
https://facebook.github.io/prophet
MIT License
18.03k stars 4.48k forks source link

monthly forecast with additional regressor where not all future values are known. #2046

Open rwagner1 opened 2 years ago

rwagner1 commented 2 years ago

Hi there,

I'm using Prophet to predict daily sales values, and I later accumulate these daily predictions to output a monthly sales total (with propagated errors). I'm currently considering seasonalities (weekly, monthly, yearly) and holidays. This model has been deployed and is performing with acceptable test uncertainty.

As a next step, I'd like to incorporate weather data (temperature) using an additional regressor to further improve the model's predictions. I've got all the necessary daily temperature values from the past and forecasted temperature values for +4 days in the future. Obviously predicting temperature values further out (e.g. up to the end of the month when we're only at the beginning) introduces too high uncertainty which I'd like to avoid.

I'm also aware of the fact that I need all future values for an additional regressor. The current idea on how to proceed is as follows: I'd use an additional regressor to predict daily sales for +4 days into the future. The remaining sales predictions (until the end of the month) are then calculated without using an additional regressor. I'd then aggregate those two future dataframes to predict the total monthly sum. Assume that we are >=4days away from the end of the month at the time of prediction. The other case is trivial (I'll just use the additional regressor).

Does this approach sound reasonable to you? Any suggestions on how to do it better?

I was initially considering imputing the missing future values for daily temperature with a constant. But I don't want to feed fake data into the model.

I'd very much appreciate your constructive feedback on this. Thanks!

hansukyang commented 2 years ago

How sensitive is your prediction to daily temperature? One way to approach this would be:

Might be an interesting experiment to see how well this approach might work compared to your suggestion. I run a small weather data service and would be happy to give you trial access to test it out if you're interested (seasonal data is not available for free-tier).