How do I get trend and/or seasonality data that Prophet is creating in my Robyn model? #689
-
Hi Robyn Community, Use case - I see that dummy variables or Holiday variable from Prophet is not helping my model to predict the peak holiday sale season. My sales data has very significant upward trend across 3 years. So, my thought process is that may be cz I have 3 dummy variables for black friday, cyber monday, and Xmas capturing these peaks across 3 different years with significantly different level of sales (due to upward trend), I am only getting an average impact in the outcome. So, if I interact the dummy variables with trend variable, predictions in these peak dates would improve. Same logic for holiday slump time. Trend is getting created during InputCollect step using Prophet. I would like to access trend and seasonality variable prior to running InputCollect and pass them as context variables along with interaction variables that I would create by multiplying trend with dummy variables. How do I access trend and seasonality data created by Prophet? https://facebook.github.io/prophet/docs/quick_start.html The the link above only shows how to plot the components. How do I access the components? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Given the components plot is a ggplot2 object returned by prophet, you could access the data with |
Beta Was this translation helpful? Give feedback.
Given the components plot is a ggplot2 object returned by prophet, you could access the data with
components$data
, wherecomponents
is the result of runningprophet_plot_components(m, forecast)
(reference).