# Improving Accuracy of Time Series Forecasting by Applying an ARIMA-ANN Hybrid Model

Hadid Wahedi, Kacper Wrona, Mads Heltoft, Sarkaft Saleh, Thomas Roum Knudsen, Ulrik Bendixen, Izabela Nielsen, Subrata Saha, Gregers Sandager Borup

<figure><img src="image_1.png" /></figure>

## ► To cite this version:

Hadid Wahedi, Kacper Wrona, Mads Heltoft, Sarkaft Saleh, Thomas Roum Knudsen, et al., Improving Accuracy of Time Series Forecasting by Applying an ARIMA-ANN Hybrid Model. IFIP International Conference on Advances in Production Management Systems (APMS), Sep 2022, Gyeongju, South Korea. pp.3-10, 10.1007/978-3-031-16407-1_1. hal-05386004

HAL Id: hal-05386004

https://inria.hal.science/hal-05386004v1

Submitted on 27 Nov 2025

HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

<figure><img src="image_2.png" /></figure>
<figure><img src="image_3.png" /></figure>

ifip

International Federation for Information Processing

This document is the original author manuscript of a paper submitted to an IFIP
conference proceedings or other IFIP publication by Springer Nature. As such, there
may be some differences in the official published version of the paper. Such
differences, if any, are usually due to reformatting during preparation for publication or
minor corrections made by the author(s) during final proofreading of the publication
manuscript.
<figure><img src="image_4.png" /></figure>

# Improving Accuracy of Time Series
Forecasting by Applying
an ARIMA-ANN Hybrid Model

Hadid Wahedi<fnref n="1" />, Kacper Wrona<fnref n="1" />, Mads Heltoft<fnref n="1" />, Sarkaft Saleh<fnref n="1" />(✉), Thomas Roum Knudsen<fnref n="1" />, Ulrik Bendixen<fnref n="1" />, Izabela Nielsen<fnref n="1" />, Subrata Saha<fnref n="1" />, and Gregers Sandager Borup<fnref n="2" />

**Abstract.** Accurate demand forecasting is critical for any small and medium-sized manufacturer. Limited structured data sources commonly prevent small and medium-sized manufacturers from improving forecasting accuracy, affecting overall performance. We classified products, then implemented a hybrid forecasting method and compared the outcome with Exponential smoothing, ARIMA, LSTM, and ANN forecasting techniques. Numerical results demonstrate that a selection of forecasting methods is not independent of product categorization. For slow-moving products, careful consideration is required. The hybrid ARIMA-ANN method can outperform some existing techniques and lead to higher prediction accuracy, by capturing both linear and nonlinear variations.

**Keywords:** Machine learning · Forecasting · ARIMA-ANN

## 1 Introduction

Demand forecasting is the focal point of making informed strategic and operational business decisions such as procurement, capacity planning, and inventory control. Accurate forecasting facilitates small and medium-sized manufacturers to make informed business decisions [21]. Commonly, the manufacturers experience uncertainty and irregular demand patterns throughout the year, where demand patterns consists of both linear and nonlinear components. Therefore, improving forecasting accuracy can substantially enhance delivery performance and profitability by reducing the probability of shortages.

<footnote n="1">¹ Department of Materials and Production, Aalborg University, 9220 Aalborg East, Denmark</footnote>

<footnote>{hwahed17,kwrona21,mhelto18,ssaleh18,trkn17,
ubendi18}@student.aau.dk, {izabela,saha}@mp.aau.dk</footnote>

<footnote n="2">² SKIOLD A/S, 9300 Sæby, Denmark</footnote>

<footnote>gsb@skiold.com</footnote>
Product classification and demand forecasting should not be considered separately [6]. Determining the proper forecasting approach is always crucial. The forecast of finished products seeks to model customer demand over time, concerning quantity and a time horizon to plan for customers' requests for quotes. On the other hand, forecasting on raw materials aim to optimize inventory, minimize capital tied up in raw material, smooth the production run, etc. [20]. Since the distribution of demand during lead times is used to secure replenishment and order points of inventory, the degree of accuracy is a crucial aspect of successful inventory management to secure delivery promise. However, almost every product shows random irregular patterns [12,22], that standard statistical methods might fail to capture. We present a brief overview of the methods used in this study in Table 1.

<table><caption>**Table 1.** Literature review</caption><thead><tr><td>Study</td><td>Method</td><td>Strength</td><td>Weakness</td></tr></thead><tbody><tr><td>[22]</td><td>Exponential smoothing</td><td>Simplicity and inexpensive, the model can easily be adjusted to changes.</td><td>Take limited observations into account.</td></tr><tr><td>[8,9]</td><td>ARIMA</td><td>Ability to generate accuracy in forecasting when time series data is stationary. Flexible in representing several types of time series.</td><td>Inefficient in modelling complex nonlinear patterns.</td></tr><tr><td>[25]</td><td>ANN</td><td>Showcases ANNs ability to comprehend, approximate and model problems that are complex in nature and underlines the strength of ANN in predictive outcomes.</td><td>ANN generates approximations which serve as solutions to different learning problems.</td></tr><tr><td>[1,2,16,28]</td><td>LSTM forecasting model</td><td>LSTM solves vanishing gradient problems, enabling the model to cope with long-term dependency between the observations.</td><td>Can only capture nonlinear patterns. The distribution of errors on the test set some- times equal to the validation set.</td></tr><tr><td>[11,24]</td><td>Gated Recurrent Unit</td><td>Collects relationship from massive data sequences without losing information from previous inputs.</td><td>A vast amount of data needed for optimal performance.</td></tr><tr><td>[4,17,29]</td><td>Hybrid forecasting ARIMA and ANN</td><td>The ability to comprehend linear and nonlinear patterns; hybrid models copes better with unstable and changing patterns in data</td><td>The optimal ANN architecture can vary with products and be challenging to implement</td></tr></tbody></table>
The core analysis of this paper is the outtake of well-known forecasting frame-
works such as Exponential smoothing, ARIMA, LSTM, and ANN. A hybridiza-
tion of ARIMA and ANN methods consisting of linear and nonlinear components
is implemented. In cases where limited historical data is available, the most com-
mon time-series forecasting techniques, Exponential smoothing, ARIMA, and
bootstrapping, have proven to yield undesirable accuracy scores [12]. To inves-
tigate if other and more complex methods could produce more accurate results
on the limited data, a hybrid ARIMA-ANN model has been implemented.

Researchers proposed various raw material categorization methods, based on the usage rate (e.g., slow, medium, and fast-moving), cost per unit (e.g., A-B-C analysis) and part criticality [5,26]. Categorizations can be helpful when conducting forecasts and making decisions, while the variation of consumption patterns can differ significantly in each category [6]. For example, fast-moving materials are often used and might not need to keep inventory long, whereas slow-moving materials remain in stock for extended periods. Slow-moving raw materials has the highest impact, implying that having these raw materials in inventory ties up capital significantly more than fast-moving raw materials.

This study is based on collaboration with the Danish manufacturer, SKIOLD A/S. The company provides the most innovative and reliable manufactured solutions for the agricultural industry, from fieldwork to livestock. A pilot study was initiated to answer the following key research questions: Does product classification affect the forecasting method selection? Can hybridization improve forecasting accuracy, and which computational intelligence methods will yield the highest accuracy? The main objective of forecasting is to improve the overall performance of manufacturers. However, in this study, the objective was analyzing the interaction of forecasting method selection and product categorization.

2 A Case Study

This case study was conducted in collaboration with SKIOLD A/S, located in Denmark, which previously experienced considerable challenges with demand forecasting and production planning that have had the negative consequence of poor delivery performance. The stochastic nature of the demand has made it difficult for the collaboration partner to determine a forecasting approach, as the data contains both linear and nonlinear components.

This case study was conducted with a bottom-up approach to experiment and
analyze outcomes of forecasting techniques on a disaggregated product level,
based on monthly consumption in the period 2017-2021. The first three years
(36 data points) were used as the training set for the different forecasting models.
The following 12 month's data are used as a test set. Finally, six months' data is
used as a validation set. The following criteria are considered when categorizing
the raw materials based on the consumption during the study period from 2017
to 2021: (i) slow-moving materials if the amount consumed is less than 10,000
units/year, (ii) medium-moving if the consumption is 10,001 to 50,000 units/year
and (iii) fast-moving if the consumption is above or equal to 50,001 units/year.
A detailed overview of the analysis is presented in Fig. 1a.
# 3 Methods

A brief overview of each method used in this study is presented below:

**Auto-Regressive Integrated Moving Average (ARIMA) (p,d,q)** modeling is essentially an exploratory data-oriented technique with the flexibility of fitting an appropriate model. The stochastic nature of the time series can be approximated using the auto-correlation function (ACF) and partial auto-correlation function (PACF). It will help to extract information such as trend, periodicity component, serial correlation, etc. [15]. Using the ARIMA model for forecasting, it is presumed that the demand series is stationary and homogeneous. While implementing ARIMA, the following five steps was integrated: (I) data preparation, (II) model selection based on p (order of auto-regressive part), d (order of the moving-average process), and q (order of the difference) (III) estimation, (IV) diagnostic checking based on Augmented Dickey-Fuller test, and (V) accuracy measure based on MAPE, MSE, and MAE [14].

**Artificial Neural Network (ANN)** is a computational intelligence model that simulates how the human brain learns and processes information. It is expected to have fewer miss-specifications in the data-driven approach (e.g., ANN) than in parametric methods (e.g., ARIMA). Standard ANN models are based on neurons that compose the input layer, which is then processed in the hidden layer and sent to the output. The number of hidden layers, the number of neurons in each layer, and the weights between neurons in various layers affect the model's performance [19]. The ANN method is extensively used for forecasting [3] due to its advantages in replicating complex system behavior [13].

**Long Short-Term Memory (LSTM)** is a sub-class of Recurrent Neural Network (RNN) for sequential dependent data. The primary distinction between RNN and LSTM is that the latter can hold long-range time dependency information and appropriately map input and output data. The LSTM network differs from traditional perceptron architecture (e.g., ANN) because it has a cell and gates that govern information flow. An input gate, a forget gate, an internal state (cell memory), and an output gate are all part of the LSTM. Each cell guarantees the reliability of information transmission and avoids the problem of loss of gradient[10,18].

The **hybrid ARIMA-ANN** approach implemented in this study has two key steps. The linear component of the data is analyzed by applying the ARIMA model in the first step. Later, a suitable ANN architecture was identified to cope with the nonlinear pattern of the data. Therefore, the hybrid model consists of both linear and nonlinear components as [29]:

$$y_t = L_t + N_t \quad (1)$$

where $L_t$ represents the linear component of the model at a time, $t$ and $N_t$ represent the nonlinear component at time $t$, and $y_t$ represents the implemented hybrid method consisting of linear and nonlinear components. First, the ARIMA model is implemented to predict the linear components. The corresponding residuals obtained from the ARIMA model ($e_t = y_t + \hat{L}_t$, where $e_t$ denotes the residual
at time $t$, and $\hat{L}$ represents the forecast value from the estimated relationship) are then used as input for the ANN model, which can be presented as:

$$e_t = f(e_{t-1}, e_{t-2}, \dots, e_{t-n}) + \varepsilon_t \quad (2)$$

where $n$ represents the number of input nodes, $f$ is a nonlinear function determined by the neural networks, and $\varepsilon_t$ is the white noise. If Eq. 2 is denoted as $\hat{N}_t$, then the hybrid forecast at time $t$ is defined as:

$$\hat{y}_t = \hat{L}_t + \hat{N}_t \quad (3)$$

Figure 1b represents the detail of the hybrid ARIMA-ANN framework.

<figure><img src="image_5.png" /><figcaption>Fig. 1. The detail computational scheme and hybrid-ANN methods</figcaption></figure>

The hybrid model takes advantage of the unique features and strengths of both the ARIMA and the ANN models in capturing linear and nonlinear patterns and is commonly expected to yield more accurate results. Note that the hybrid ARIMA and LSTM is not relevant for this analysis, while the LSTM model does not perform optimally when the sample size is too small [7, 27, 30].

To ensure good performance, an optimization of the following hyperparameters was conducted, while implementing each method [1]. (i) **Epoch size:** An epoch stands for training the neural network with all the training data for one cycle (10–200); (ii) **Batch size:** The batch size defines the number of samples that is propagated through the network (1–4); (iii) **Number of hidden layers:** The hidden layer performs a nonlinear transformation to the input and produces an output (1–2); (iv) **Number of neurons:** A neuron is a mathematical function that is the weighted average of its input, this sum is passed through a nonlinear function, often called the activation function, (e.g., ReLU) (8–200); (v) **Dropout**
**rate:** The dropout rate influence the performance of neural networks by enhancing model regularization to reduce overfitting of predictions (0-20%). For example, suppose the number of neurons is too small. In that case, the system will be unable to memorize all the information required to achieve optimal prediction, or if it is too high, the system will overfit the training instances. Similarly, if a high epoch value is set, the system will overfit the predictions. Conversely, if a low epoch value is set, the system will underfit the optimal prediction. The following performance measures have been used, namely(i) Mean absolute error (MAE)= $\frac{1}{n}\sum_{t=1}^{n}|a_t - \hat{y}_t|$, (ii) Mean absolute percentage error (MAPE)= $\frac{1}{n}\sum_{t=1}^{n}|\frac{a_t - \hat{y}_t}{a_t}|$, and (iii) Mean squared error (MSE)= $\frac{1}{n}\sum_{t=1}^{n}(a_t - \hat{y}_t)^2$ are considered, where $a_t$ is the actual observation and $\hat{y}_t$ is the predicted value.

The **k-nearest neighbors (KNN)** algorithm is one of the simplest similarity-based artificial learning algorithms, offering reliable performance in many contexts. The primary notion behind classifying a given instance is to have the closest neighbor instances in terms of a preset distance. The most common class then determines the new instance's class among the k-nearest neighbors. The value of k (=3) must be chosen a priori [23].

# 4 Results

Twenty different products have been considered and categorized into three groups based on usage rate. Eleven are slow-moving, four are medium-moving, and five are fast-moving products. After applying all five methods, it was found that the hybrid ARIMA-ANN method outperforms all other four methods in terms of MAPE, MAE, and MSE. One medium moving product had conflicting performance measures, where both LSTM and hybrid ARIMA-ANN can lead to higher forecast accuracy. However, for slow moving products, ARIMA, LSTM, ANN, or hybrid ARIMA-ANN can lead to higher accuracy under different performance measures. Therefore, a careful secretion is warranted when considering slow moving products. KNN was applied to conduct a F-test. The results suggests that whether to select LSTM or hybrid ARIMA-ANN significantly impacts defining clusters. Clusters centers are also different.

Literature highlights the need for product categorization and forecast accuracy estimation. Several authors argue that forecasting is essential for the A-category of items. However, when looking at the BOM, the absence of one of the components can degrade the delivery performance of the manufacturers, while they are not keeping excess inventory for each item. Therefore, forecasting for all item categories is always crucial, and thereby careful data-driven methodology can support those medium-sized manufacturers for appropriate future planning.

# 5 Conclusion

The empirical results from this case study show that a hybrid model which captures both linear and nonlinear components improves the accuracy of forecasted
demand. Additionally, the hybrid model is a relevant approach that overcomes traditional forecast methods' problematic or undesirable accuracy scores based on similar data sets with a short historical record lacking trends, cycles, and seasonality. The proposed hybrid model can further aid the operational decision-making of inventory management-related raw materials.

The study's main contribution is that although only twenty products from three different categories have been considered, the study can be further extended to numerous categories. The managers need to classify products and slow-moving products; they should not rely on any blind selection. It is also found that instead of applying ARIMA or LSTM, the hybrid ARIMA-ANN method can ensure higher forecast accuracy. As a future study, we will integrate the forecast results with inventory replenishment decisions to study the impact of forecast accuracy on cost or space-saving. [19] Additionally, larger data-sets than utilized in this study will further compliment the use of deep learning models for time series forecasts in similar cases.

## References

1. Abbasimehr, H., Shabani, M., Yousefi, M.: An optimized model using LSTM network for demand forecasting. Comput. Ind. Eng. 143, 106435 (2020)

2. Abbasimehr, H., Paki, R.: Improving time series forecasting using LSTM and attention models. J. Ambient Intell. Human. Comput. 13(1), 673–691 (2022)

3. Ahmad, A.S., et al.: A review on applications of ANN and SVM for building electrical energy consumption forecasting. Renew. Sustain. Energy Rev. 33, 102–109 (2014)

4. Babu, C.N., Reddy, B.E.: A moving-average filter based hybrid ARIMA-ANN model for forecasting time series data. Appl. Soft Comput. 23, 27–38 (2014)

5. Boylan, J.E., Syntetos, A.A.: The accuracy of intermittent demand estimates. Int. J. Forecast. 21(2), 303–314 (2005)

6. Boylan, J.E., Syntetos, A.A.: Spare parts management: a review of forecasting research and extensions. IMA J. Manag. Math. 21(3), 227–237 (2010)

7. Bocewicz, G., Nielsen, P., Banaszak, Z.A., Dang, V.Q.: Cyclic steady state refinement: multimodal processes perspective. In: Frick, J., Laugen, B.T. (eds.) APMS 2011. IAICT, vol. 384, pp. 18–26. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-33980-6_3

8. Box, G.E., Jenkins, G.M., Reinsel, G.C., Ljung, G.M.: Time Series Analysis: Forecasting and Control. John Wiley & Sons, Hoboken (2015)

9. Büyükşahin, Ü.Ç., Ertekin, Ş.: Improving forecasting accuracy of time series data using a new ARIMA-ANN hybrid method and empirical mode decomposition. Neurocomputing 361, 151–163 (2019)

10. Chandriah, K.K., Naraganahalli, R.V.: RNN/LSTM with modified Adam optimizer in deep learning approach for automobile spare parts demand forecasting. Multimedia Tools Appl. 80(17), 26145–26159 (2021)

11. Chaudhuri, K.D., Alkan, B.: A hybrid extreme learning machine model with harris hawks optimisation algorithm: an optimised model for product demand forecasting applications. Appl. Intell., 1–17 (2022)

12. Dolgui, A., Pashkevich, M.: On the performance of binomial and beta-binomial models of demand forecasting for multiple slow-moving inventory items. Comput. Oper. Res. 35(3), 893–905 (2008)
13. Efendigil, T., Önüt, S., Kahraman, C.: A decision support system for demand forecasting with artificial neural networks and neuro-fuzzy models: a comparative analysis. Expert Syst. Appl. 36(3), 6697–6707 (2009)

14. Gilbert, K.: An ARIMA supply chain model. Manag. Sci. 51(2), 305–310 (2005)

15. Ho, S.L., Xie, M.: The use of ARIMA models for reliability forecasting and analysis. Comput. Ind. Eng. 35(1–2), 213–216 (1998)

16. Kantasa-Ard, A., Nouiri, M., Bekrar, A., Ait el Cadi, A., Sallez, Y.: Machine learning for demand forecasting in the physical internet: a case study of agricultural products in Thailand. Int. J. Prod. Res. 59(24), 7491–7515 (2021)

17. Khashei, M., Bijari, M.: A novel hybridization of artificial neural networks and ARIMA models for time series forecasting. Appl. Soft Comput. 11(2), 2664–2675 (2011)

18. Kim, M., Lee, J., Lee, C., Jeong, J.: Framework of 2D KDE and LSTM-Based Forecasting for Cost-Effective Inventory Management in Smart Manufacturing. Appl. Sci. 12(5), 2380 (2022)

19. Kourentzes, N., Trapero, J.R., Barrow, D.K.: Optimising forecasting models for inventory planning. Int. J. Prod. Econ. 225, 107597 (2020)

20. Lesmana, E., Subartini, B., Jabar, D.A.: Analysis of forecasting and inventory control of raw material supplies in PT INDAC INT'L. In: IOP Conference Series: Materials Science and Engineering, vol. 332, no. 1, p. 012015. IOP Publishing (2018)

21. Nielsen, P., Michna, Z., Do, N.A.D.: An empirical investigation of lead time distributions. In: Grabot, B., Vallespir, B., Gomes, S., Bouras, A., Kiritsis, D. (eds.) APMS 2014. IAICT, vol. 438, pp. 435–442. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-662-44739-0_53

22. Olesen, J., et al.: Joint effect of forecasting and lot-sizing method on cost minimization objective of a manufacturer: a case study. Appl. Comput. Sci. 16(4), 21–36 (2020)

23. Rawnaque, F.S.: Technological advancements and opportunities in Neuromarketing: a systematic review. Brain Inf. 7(1), 1–19 (2020)

24. Sajjad, M., et al.: A novel CNN-GRU-based hybrid approach for short-term residential load forecasting. IEEE Access 8, 143759–143768 (2020)

25. Shanmuganathan, S.: Artificial neural network modelling: an introduction. In: Shanmuganathan, S., Samarasinghe, S. (eds.) Artificial Neural Network Modelling. SCI, vol. 628, pp. 1–14. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-28495-8_1

26. Syntetos, A.A., Boylan, J.E., Croston, J.D.: On the categorization of demand patterns. J. Oper. Res. Soc. 56(5), 495–503 (2005)

27. Thibbotuwawa, A., Nielsen, P., Bocewicz, G., Banaszak, Z.: UAVs fleet mission planning subject to weather fore-cast and energy consumption constraints. In: Conference on Automation, pp. 104–114. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-13273-6_11

28. Van Houdt, G., Mosquera, C., Nápoles, G.: A review on the long short-term memory model. Artif. Intell. Rev. 53(8), 5929–5955 (2020)

29. Zhang, G.P.: Time series forecasting using a hybrid ARIMA and neural network model. Neurocomputing 50, 159–175 (2003)

30. Zhang, R., Song, H., Chen, Q., Wang, Y., Wang, S., Li, Y.: Comparison of ARIMA and LSTM for prediction of hemorrhagic fever at different time scales in China. Plos one 17(1), e0262009 (2022)