The logistic growth trend saturates at both lower and upper bounds. It would be useful to have a trend that saturates only on one end, e.g. that saturates at 0 but does not require specifying an upper bound.
This will require adding a new trend, adding to the linear and logistic growth trends that we already have. I think that the logistic loss function $log(1 + exp(k * (t - m)))$ should work very nicely.
If anyone is interested in making a PR for this we can discuss what is involved.
Hi @bletham, I am interested in taking a shot at this, is it a Python or R fix?
This is a little bit of everything - A new Stan model, and then the interfaces in both Python and R. This should be everything that needs to be done:
This can be done in parts.
Hey all, do we have any update on this?
Let's hold off on this until after #501, which will make it much easier and require much less code duplication.
What happened on this? #501 doesn't seem to be done yet many months later. So #307 hasn't been started? What is the recommended solution to this problem currently?
@BernierCR the latest Stan a few months ago (2.18) did add a standalone generated quantities functionality that we were planning to use for #501, but it has not yet been piped into rstan or pystan. That piping seems to be going slowly so we are right now looking into handling #501 without waiting for standalone generated quantities. We had tried this last summer and ran into some upstream bugs, hopefully it is successful this time.
In the meantime, you can get that behavior by using the logistic trend but setting the bound on the side that you don't want a bound to just be a a larger number than your forecast ever reaches.
@bletham I noticed that the forecast changes based on the upper bond, it seems to scale inversely, the higher the upper bond the smaller the forecast, is this the supposed behaviour?
Could you post the plot so I can see what you mean?
Any update on when this will be available?
Ok, sounds good, thanks! :)
Setting the upper bound to a very high relative value will work though, right?
hello! just that check the current progress of prophet's feature of not need an upper bound for saturating floor. I currently face the issue of needing to only bound my forecast to 0 yet do not want to enforce an upper bound.
not sure if setting an upper bound will actually alter the intended forecast (even if we set an arbitrary high bound)
No progress, ran into some difficulty in #865 and trying to figure out a good workaround on the rstan side.
Does anybody have an alternative solution for this meanwhile? because #307 not moving forward.
I was targeting for this to happen after #501, which would have made it easier / more generic, but after the addition of the cmdstanpy backend I've decided to no longer pursue #501 so this should just be done directly.
The new trend function can be added in the same way that the linear and logistic trends are. This is basically what needs to be done, in R and Py:
How does inputing an arbitrary large value on cap would affect the results?
I think one of the main applications of this is data that has to be positive but isn't necessarily saturating at an upper limit. There's discussion of that setting in #1668 along with some strategies so I just wanted to point people to that issue in case anyone wants to try the approaches described there. I'm especially interested to hear if the ProphetPos class that is described in that issue provides a satisfactory solution to the use cases here.
Most helpful comment
This is a little bit of everything - A new Stan model, and then the interfaces in both Python and R. This should be everything that needs to be done:
This can be done in parts.