2
$\begingroup$

I would like to forecast the car rental (count time series). Given hourly integer valued car rentals for a month's period from 24th september to 24th October. I need to forecast car rental demand from 25th october to 31st October.

The given data is shown below:

enter image description here

The Ground Truth forecast data is given as below:

enter image description here

I will describe my approach below. Please correct me and give your suggestions.

I am using the tscount package from R. https://cran.r-project.org/web/packages/tscount/index.html to model this data using a negative binomial distribution having a conditional mean (time varying).

enter image description here

It is a linear combination of logs of past means and past observations as shown below.

enter image description here

Note: The shape parameter, $\phi$ controls the dispersion/variance of the neg-binomial distribution but it is NOT time varying.

First I computed the ACF of the given data and it is shown below:

enter image description here

I save the lags of the 10 largest and 10 smallest ACF values.

Similarly, I plot the PACF of the given data and extract the lags due to 10 largest and smallest PACF values. Then I take the unique lags from the combination of ACF and PACF lags. It represents p in the above equation. I am setting p = q.

enter image description here

Then I estimate the parameters of the model using

ts_fit_175_mon1 = tscount::tsglm(ts=ts175_mon1, link='log', model =
    list(past_obs = reg_lags, past_mean = reg_lags),distr = 'nbinom')

summary(ts_fit_175_mon1)
tscount::scoring(ts_fit_175_mon1)

The resulting fit on the given data is given in orange and scoring rules are given below. enter image description here

enter image description here

The forecast is given below in orange

enter image description here

enter image description here

I would like to understand what are the problems with this forecast and how to improve it? Why is the predicted peak much higher? Some of the peaks in the ground truth are not covered. What is being missed in the forecast?

I tried to increase the number of parameters by including 20 largest and smallest lags from ACF and PACF plots leads to increased peaking and worse scoring values. How to better make use of ACF and PACF plots?

When should I be satisfied with my forecast? When I achieve the least scoring value for a model?

Is there any step that I am missing before modelling?

$\endgroup$

2 Answers 2

2
$\begingroup$

Regarding when to be satisfied with your model, one thing to do is to plot the forecast residuals (predicted - actual) v. time and also v. actual. If either plot exhibits a pattern, either there is a somewhat predictable (hopefully) signal in the data that your model is missing or your model is inserting a signal that is not really there.

$\endgroup$
1
$\begingroup$

I am not sure about your mentioned method to forecast what you want, but as an answer to the second question, there exist many other techniques to estimate forward on the planning horizon. So there are some useful error estimators to ensure how far bias the estimated demand would have over the real demand. For Example, MAPE, MAE, RMSE, etc, might be considered to calculate the error.

Also, to reduce the forecast bias you can focus on actual usage data vs. historical data. The difference: Usage reflects the actual consumption of an item. In other words, just because a product was sold to a customer doesn’t mean that product was used.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.