Closed pocakka closed 6 years ago
If you need non-positive values you can run
import numpy as np
forecast["y"] = np.where(forecast["y"]<0,0,forecast["y"])
and eventually the same for yhat_lower
and yhat_upper
. You are eventually going to miss some infos without these values. I tend to don't modify the forecast dataframe and use 0 whenever i need to take decisions with the forecasts.
You can put in a lower saturating bound by passing growth='logistic'
to Prophet()
and including it in the dataframe - described in detail near the bottom here: https://facebook.github.io/prophet/docs/saturating_forecasts.html
This does, however, require you to also specify a saturating upper bound - a value that you are sure your time series should never be higher than. Having a lower bound without an upper bound is on the to-do list in #307, and I'd expect should make the next version.
I'm going to close this out, and any discussion on the general issue of trends that saturate on only one end can be had in #307.
Hello :) My sample data is:
My code is:
The result: https://imgur.com/a/LWA99
I think, in the real life there isn't negative trading volume, just "zero". Is it possible make the negative results to zero? Made with PS a simple example: https://imgur.com/a/LNAfQ
Regards