I'm training a arima model on a daily time series data where I'm trying to forecast daily inflow counts of a request on a particular day. It can be either positive or zero (no zero requests in the data I'm dealing with) but can never be negative. I'm using ARIMA model from statsmodels library. The process I'm doing involves following steps
- The arima model parameters p ranges from (0,10), d ranges from (0,3), q ranges from (0,5)
- The model will try all possible combinations for (p,d,q) and selects the combination with the least AIC score. In my case, the best combination is (6,2,1) with AIC of 7204.084892
When I plotted my forecasts, it is predicting negative inflow requests instead of positive requests. I don't understand this because, in the months leading to the test data set, all the inflows are in thousands but the predictions are negative. Can someone please explain why this is happening? Are there any methods that can be done to the data before passing it to the model? Train: Data during training period; Test: Original data during testing period; Test_predicted: Predictions made for testing period by arima model;
sm.tsa.ARIMA
model, which has been deprecated. I suggest trying withsm.tsa.arima.ARIMA
model instead. Otherwise, you can try passingtyp='levels'
to the predict or forecast method. $\endgroup$