prophet icon indicating copy to clipboard operation
prophet copied to clipboard

Logistic Growth without log transformation?

Open denizn opened this issue 8 years ago • 5 comments

I have checked the documentary and it appears that for us to use logistic growth, we need to make a log transformation.

Is this the case? Can we not use 'logistic growth' if we do not convert the variable via log transformation?

Also should we convert it back to np.exp(forecast['yhat']) in order to come up with actual demand forecast?

Thank you, Deniz

denizn avatar May 25 '18 04:05 denizn

No, the logistic growth is separate from any log transformation.

The examples in the documentation use log transforms because those particular time series have very skewed noise distributions that are nicer after taking the log. There is no need to take a log in order to use the logistic growth.

I can see how that could be confusing, the documentation should be updated to clearly state that.

bletham avatar May 25 '18 21:05 bletham

So if I use logistic growth and a cap I should not get any non-negatives, right?

denizn avatar May 26 '18 01:05 denizn

I am deciding on the cap as 10*mean(historical demand). How much does the variable matter? I do not know if I am statistically correct by setting a cap of 10 or 100 here...

denizn avatar May 26 '18 01:05 denizn

The logistic growth model has a floor, which by default will be 0 so your trend will always be positive.

You may still end up with some negative forecast values because of the additive seasonality, which if it has a negative component when added to the trend could produce negative values.

If the cap is much larger than the values of the forecast, it will essentially produce a linear trend. I would not expect there to be much sensitivity to the value of cap used as long as it is larger enough than the forecast that it hasn't started saturating. I'd recommend trying it with a few values and plotting with m.plot(forecast) to get a feel for the effect that it has.

bletham avatar May 26 '18 01:05 bletham

Documentation updated to no longer have any log transforms.

bletham avatar Jun 07 '18 18:06 bletham