问题
Does statsmodels.api.tsa.ARIMA(mylist, (p,d,q)).fit().predict(start, end) only work for d=0?...
myList is a list of 72 decimals all >0, p=2, d=1, q=1, start=72, end=12 and the majority of the forecasts are negative decimal numbers which leads me to believe statsmodels doesn't automatically undifference after performing the forecasts.
回答1:
See the typ
keyword of predict in the docstring. It determines whether you get predictions in terms of differences or levels. The default is 'linear' differences not levels. As an aside, your start should not be greater than your end. If this works, then this may NOT be giving you what you want and should probably be reported as a bug.
来源:https://stackoverflow.com/questions/27258465/python-out-of-sample-forecasting-arima-predict