Hello,
I'm using Prophet in R to make forecast and catch seasonality for my project. I have some questions regarding to the plot I got from 'prophet_plot_components'.
On the weekly plot, there are a lot negative values which don't make sense to me. The data I used doesn't have any negative values and also shouldn't have negative values in reality. So I'm wondering what the y axis represents. Does it represent the value of 'y' in the data frame or represent any trend? Besides, I don't have any data on Saturdays and Sundays, but the plot gave me high values on weekends. I'm not sure why this happens, and I'm wondering if I should put in zeros for all the missing dates.
I appreciate if anyone can answer my questions below or share any useful links of any information I missed.

Hi Vhpietil, thank you for answering my questions! It's really clear.
I will need to remove the weekend predictions as my next step. However, I'm not sure how to remove them. I have read the 'data with regular gap' section, but I don't know how to write the R code to read dates and separate weekends out. Could you give me any suggestions or share any links might be helpful?
Thanks!
I think lubridate-package and wday-function will do the trick
Thanks! Just one more question.
Is the 'yhat' in the forecast table the actual prediction of the data?
Just a follow up with my question regarding to 'yhat'.
If 'yhat' is the predicted value, is it possible to make it non-negative? Since the data in my case can never be negative, I expected the lowest predicted value to be zero. However, I got a few negative numbers in 'yhat' now. So I'm wondering if there is any way not to get negatives in the prediction. Thanks!
There isn't a way to entirely avoid negative values for the prediction of yhat, other than to rectify them after the prediction, with something like
forecast$yhat[forecast$yhat < 0] = 0
If you use the logistic growth trend, then the trend component will always be positive. However the seasonal swings could potentially still push yhat to be negative. You do have to specify a capacity also, but it can just be a value larger than what you expect to see in the future. Issue #337 is what will be needed to get true only positive predictions; on the to-do list!
Most helpful comment