Hi!
I really enjoy using prophet. However, i do have a question regarding cap. Currently i am fitting my data using logistic growth. At first, i am using a 1.2 * y.max() for the cap (constant cap) and it seems to work quite well.
However, i want to try to have the hypothesis of growing cap for the future forecast. Let us assume 4 % growth in the cap. I realized that having a cap that increases also results in the forecast trend to be growing (even though it is no where near the cap). Also, what should i use as the cap for the historical data to prevent such a jump?
And to solve such jump, what i currently do is to set the same cap as the first future period (here for example we have 2019 -04 to have a cap of value X. Then i set X for the historical cap as well to prevent the 'drop' or 'jump'
This is an example. (unfortunately i cannot share the data

so if i simply use 1.2 * y.max() as a constant cap for the historical data and allow user to define the cap (a hypothesis cap) for the future forecasted period. But, if the historical cap is too high (i.e historical cap > future cap) this fall in cap will result in the fall in trend which does not seems quite right.
So far, i am achieving a good result by defining a constant cap using a flat rate. In this case, 1.2 scale factor on the maximum value for historical and future seems to work well. I am stuck on trying to fit the process of defining a future hypothesis cap since i do not have information on past cap (using the historical data to define the cap doesnt seem right as well)
i,e y = [1,2,,3,1,2,3,4]
then cap for df and cap for future = 4 * 1.2
it will be good if you can provide some guide or tips! Thanks
With the logistic growth trend, the trend is modeled with a logistic growth curve (https://en.wikipedia.org/wiki/Logistic_function) and the value of cap is "L" in the equation there. Given L, the growth rate parameters k and x0 are fit. Basically the way to think about it is that as we move forward in time, we move smoothly along the growth curve between 0% and 100% (L).
Let's say at time t I'm at 60% of L and that grows to 61% at time (t+1). If L at time t is 100 but then at time (t+1) it jumps to 1000, then y_hat will jump from 60 to 610. So you do need L to vary smoothly in order to have a smooth forecast.
So what types of functions for the cap make sense. One that works is if the capacity is itself saturating. Maybe cap is the population of a country, and it is forecasted to grow for a few years but then flatten off. What that will do to the model is allow it to have a faster growth rate early on (the % of the country is growing, as well as the number of people) but then when the capacity flattens out all that will be left is the growth in %, which will itself eventually saturate at 100%.
I hope that clarifies why you see a jump, and how the model behavior depends on the capacity.
@bletham, thanks for the explanation. Is there a way to adjust the steepness parameter k when using logistic growth in prophet?
Not really, it's fit to the data and doesn't have a prior. You'd have to modify the Stan code to add a prior if you wanted to nudge it in a particular direction.
Most helpful comment
Not really, it's fit to the data and doesn't have a prior. You'd have to modify the Stan code to add a prior if you wanted to nudge it in a particular direction.