Research on E-Commerce Inventory Demand Forecasting Based on NAR Neural Network

Abstract

As the competition of e-commerce enterprises intensifies, efficient demand supply becomes an important weight for enterprises to compete. The current inaccuracy of demand forecasting in e-commerce enterprises is frequent, leading to increased difficulty in inventory management and weakened competitiveness. In order to improve the accuracy of demand forecasting, intelligent decision-making technology is introduced to establish a NAR neural network model, and the NAR model is used to simulate the prediction of historical sales data in the current system. The simulation results are compared with the prediction results of the AR model, and it is concluded that the prediction results of the NAR neural network are more accurate and better for enterprises to make inventory demand plans and accelerate the transformation of e-commerce enterprises to digital intelligence.

Share and Cite:

Wu, P.J., Zhang, G., Li, Y.Q. and Chen, X.Q. (2023) Research on E-Commerce Inventory Demand Forecasting Based on NAR Neural Network. Open Access Library Journal, 10, 1-11. doi: 10.4236/oalib.1110196.

1. Introduction

With the rapid development of the Internet and information technology, Internet-centric e-commerce companies are rapidly pulling up, in particular, e-commerce businesses flourished during the epidemic [1] , attracting the physical industry to follow suit, which invariably increased the competitive pressure on e-commerce businesses. Market competition becomes no longer simply an independent competition between enterprises, but the core of competition is the comprehensive ability between supply chains [2] , which makes e-commerce enterprises pay more attention to supply chain management. And inventory demand forecasting [3] , as one of the key aspects of supply chain management, is essential to be able to predict future demand with reasonable accuracy. However, the current inaccurate demand forecasting in e-commerce companies is frequent, leading to increased difficulty in inventory management and weakened competitiveness, so timely and accurate inventory demand forecasting is especially important.

For inventory demand forecasting methods can be divided into three main types: traditional statistical-based forecasting methods, intelligent forecasting algorithms based on machine learning, and combined forecasting methods. Exponential smoothing [4] , differential autoregressive moving average (ARIMA) models [5] , and linear regression methods are traditional forecasting methods, such as Wang et al. [6] , which used a nonlinear functional model to solve the problem of missing information data about. Hussain et al. [7] used exponential smoothing method to study customer demand and concluded that the magnitude of demand variation reduces the accuracy of forecasting. Snyder R D et al. [8] considered the uncertainty factor of seasonal fluctuations and applied the exponential smoothing method with high feedback sensitivity to the inventory demand forecasting problem, but since such methods can only deal with the linear relationship of the forecast object and cannot cope with the complex changes in the actual environment, models with nonlinear modeling capabilities are gradually proposed by scholars, and such are intelligent forecasting algorithms based on intelligent machine learning, the common ones are gray prediction method, system dynamics model, and neural network method. For example, Beutel et al. [9] considered the factors influencing consumer demand forecasting and used the optimization of the target inventory function using linear programming with variables under different conditional constraints and compared the results with the regression forecasting model to predict the demand; Jose et al. [10] proposed an analogous time series of similar products to predict the demand of short life cycle products in the face of missing data, and after comparing with Various methods were compared and found that this method obtained more accurate prediction results for the shortest prediction time; González Perea et al. [11] combined artificial neural networks, Bayesian framework and genetic algorithm to build a combined prediction model, which provided a new method for short-term demand forecasting in the case of limited data, and the results improved the prediction accuracy by more than 3%; Viedma D. T. et al. [12] used LSTM neural network model to solve the time series forecasting problem and achieved good results. In general, compared with traditional forecasting methods, such algorithms are more efficient and accurate in forecasting, and are also able to make relatively accurate forecasts under conditions such as unstable supply and demand relationships. However, through a large number of empirical analysis, it is obtained that the prediction information cannot be fully extracted by using a single prediction model, and the combination of different model advantages can obtain the optimal effect, which is called the combined prediction method, such as Ming Zhao et al. [13] According to the prediction advantages of ARIMA and BP models in linear and nonlinear problems, a combined prediction model integrated with ARIMA model fitted linear features and BP model fitted nonlinear features was established; Malik and Hussain [14] use a combination of qualitative methods and deep neural networks to predict the evaluation of e-commerce products, define positive and negative emotions through qualitative definitions, and then use deep neural network predictions as evaluations, and the prediction results support the decision-making analysis of e-commerce enterprises; Jin et al. [15] proposed a combined prediction method that combines VMD, ARMA and the Nuclear Limit Learner (KELM) for the prediction of air passenger flow. As can be seen, existing research in demand forecasting is focused on improving forecasting accuracy. Both single forecasting models and combined forecasting models can provide more accurate forecasts of inventory demand within a certain range. However, there is no mature reference standard on how to choose a reasonable single forecasting model and how to make the optimal combination of models to improve the forecasting accuracy more effectively.

With the rise of e-commerce and the continuous impact of mobile Internet [16] , the business model of traditional enterprises has also opened new ideas, typically with the development of e-commerce, with offline as the main body, online and offline sales business models, this type of e-commerce enterprises due to the development of online mode soon, did not form a perfect system to effectively predict the end demand, mainly relying on the experience of personnel before the transformation, through the assessment of procurement personnel to control the effectiveness of procurement, coupled with the uncertainty of online consumer demand, resulting in a large deviation in inventory demand forecast, inventory shortages or high situation often occurs, affecting customer demand satisfaction and also to this type of e-commerce enterprises to bring a variable amount of losses. In addition, with the rapid development of the enterprise, the scale of the enterprise is increasing, the corresponding types of goods are also increasing, the workload of each procurement staff is increasing, and the procurement efficiency will be difficult to ensure, therefore, the problem of inaccurate inventory demand forecast needs to be solved in a timely manner [17] , which will seriously affect the development of the enterprise if it is not solved effectively.

In summary, based on the existing research, this paper constructs a model specifically applicable to e-commerce inventory demand forecasting―NAR neural network model. Firstly, SPSS was used to group and process the data in order to better simplify and process the data; secondly, the NAR model error was tested and compared with the AR model test error to observe its goodness; finally, the NAR model was used to predict the data with the AR model, and the predicted value was compared with the real value to verify that the NAR model is more feasible.

2. NAR Neural Networks

2.1. Introduction to NAR Methods and Principles

The full name of NAR neural network is nonlinear autoregressive neural network [18] , which is proposed relative to the linear autoregressive model, using its own historical data as regression variables, the model is proposed for time series forecasting, which can use a linear combination of random variables from several sections of history to predict the regression model of future random variables, compared with the traditional time series forecasting, the choice of NAR neural network performed, the generalization ability and applicability of the model are more improved, and at the same time, its excellent ability to handle nonlinear data is more than the traditional time series forecasting.

Depending on the specific implementation, there are differences in the way dynamic neural networks accomplish dynamics, and they can be broadly classified into two types: the first is regression neural networks, which use static neurons and feedback from the output of each layer of the network to form a dynamic network, such as NAR nonlinear autoregressive networks; the second is neural networks that use feedback from neurons, such as Elman neural networks [19] etc. In general, NAR neural networks tend to be more capable than full regression neural networks, and thus are often used in nonlinear dynamic systems. The NAR neural network model has been widely used to predict time series in other research areas. The NAR neural network consists of an input layer, a hidden layer, an output layer and an input delay order. It can be expressed as:

y ( t ) = b 0 + b 1 y ( t 1 ) + b 2 y ( t 2 ) + + b n y ( t n ) + ε ( t ) (1)

where ε ( t ) is the white noise. Based on this principle, the NAR neural network model used in this paper can be expressed as:

y ( t ) = f ( y ( t 1 ) , y ( t 2 ) , , y ( t d ) ) (2)

where f is the activation function used in the neural model. y ( t ) represents the current period inventory. y ( t 1 ) , y ( t 2 ) , , y ( t d ) denotes the historical period inventory; d denotes the delay order, and y ( t ) denotes the forecast period inventory quantity. The structure of its NAR neural network is schematically shown as follows (Figure 1).

2.2. Construction of NAR-Based Neural Network Predictions

2.2.1. Determine the Delay Order and the Number of Neurons in the Hidden Layer

The delay order and the number of neurons in the hidden layer are the most important and fundamental parameters of a neural network, and their suitability is directly related to whether a feasible network can be obtained.

Figure 1. NAR neural network structure diagram.

2.2.2. NAR Network (Open-Loop) Mode Training

Thirty sets of data collected from Company A for 43 inventory products from June 2019 to November 2021 were entered into the NAR network as the tuning data for the NAR neural network and trained, after which four sets of actual inventory product data were used as the validation data for the prediction results.

Once the NAR neural network has been trained with the sample data, the first step is to observe the error autocorrelation plot. If the error autocorrelation plot is within the 95% confidence interval for all error autocorrelations except 0, then the NAR neural network is considered to be successfully trained, otherwise, it needs to be retrained.

2.2.3. The Network Makes Predictions

When making a prediction, the network is adjusted to the original parallel mode (close-loop) and the predicted output of the previous step is used as the input signal for the next step to obtain the prediction result of the network.

Based on the above steps, the flow of the NAR neural network based prediction model is obtained as shown in Figure 2.

3. Simulation Analysis

3.1. Data Sources and Processing

An e-commerce company (hereinafter referred to as Company A), mainly engaged in researching and selling tea and coffee, is a typical representative of e-commerce companies that takes offline as the main body and jointly operates online and offline. Through field survey, company A has 43 kinds of inventory products, 34 monthly inventory demand data from June 2019 to March 2022, considering the prediction and inspection of 43 inventory product models is a very complex and huge workload, and used for each type, so for convenient work and considering the results are representative, we use the cluster analysis [20] , using the average connection method to classify 43 inventory products into four groups, according to the average linkage spectrum diagram, there are four groups as follows (Table 1).

3.2. NAR Model Test Results

According to the four sets of data obtained from the cluster analysis, the four sets of data were autocorrelation tested respectively (the time series trend chart of the 30 sets of data is consistent with that in the AR model, so it is omitted).

Figure 2. NAR neural network flow chart.

Table 1. Classification of the 43 products in stock.

The error autocorrelation coefficients calculated for the four types of data are shown below (Figure 3).

As can be seen from the graph above, some of the lags of categories 1 and 2 are outside of 1. The confidence levels of the model for the remaining intervals are within the confidence interval and are adequate from a qualitative point of view of error autocorrelation; most of the lags of categories 3 and 4 are within 1, indicating that the model tests are good.

From the results of the comparison in Table 2, it can be seen that the NAR model is better than the AR model in terms of stable R2, error rate and prediction accuracy are better fitted than the AR model, therefore, it can be concluded that the NAR model can better fit the future trend of the sample.

Table 2. Comparison of the results of the two model fits.

Figure 3. Autocorrelation test.

3.3. Comparative Analysis of the Prediction Accuracy of NAR and AR Models

According to the four groups of data obtained from the clustering analysis, the AR model and NAR model were used respectively, and the data of the first 30 months of Company A's sample were used as the training set for constructing the model, and the data of the last 4 months were used as the test set for model validation, and this predicted value was compared with the actual value, in order to make the effect more significantly presented, we combined the data of the four groups together, and the comparison results are shown in Figure 4, and the errors in the predicted values of the NAR and AR models are shown in Figure 5.

As can be seen from Figure 4, the prediction values of the NAR model are closer to the actual values in comparison; as can be seen from Figure 5, the error of the prediction results of the NAR model is mainly in the range of −5% to −1%, while the error of the prediction results of the AR model is in the range of −7% to 7.12%, from which it can be obtained that the NAR neural network prediction method has better prediction accuracy and precision compared with the traditional AR model.

Figure 4. Comparison of predicted and actual values from NAR and AR models.

Figure 5. Comparison of NAR model, AR model prediction errors.

4. Conclusions

This paper establishes a model for e-commerce inventory demand forecasting based on NAR neural network, and verifies the feasibility of using NAR neural network to forecast e-commerce inventory demand forecasting by comparing it with AR forecasting model, in order to bring valuable reference opinions for the same type of e-commerce enterprises in inventory management and decision making, and draws the following conclusions through simulation verification and analysis of forecasting results.

1) In consideration of the fact that too much sample data would affect the model prediction and testing, the raw data was processed and the data was classified by cluster analysis using the mean linkage method, which can effectively improve the model prediction.

2) Using the sample data, the NAR neural network model and the AR model were validated separately, and the results showed that the NAR model was able to better fit the future trend of the sample.

3) The NAR neural network prediction model was developed and the effectiveness of the method in predicting the inventory demand of e-commerce enterprises was verified with the measured data. Compared with the AR prediction model, the NAR prediction error is between −5% and −1%, which is more accurate. Therefore, it is feasible to use NAR neural network to forecast the inventory demand of e-commerce enterprises.

This paper proposes the use of NAR neural network model for inventory demand forecasting in e-commerce enterprises, which is feasible to a certain extent, but cannot make an accurate description of the complex environment with multiple influencing factors, and needs to consider the uncertainty and dynamic factors in the actual operation of enterprises for more comprehensive and accurate inventory demand forecasting. The next stage of the research will be to add multiple influencing factors in a complex environment and carry out multi-objective optimisation to achieve a significant improvement in the forecasting capability of the model.

Fund

This paper is supported by the Undergraduate Research Innovation Fund of Anhui University of Finance and Economics (XSKY22142).

Conflicts of Interest

The authors declare no conflicts of interest.

References

[1] Choshin, M. and Ghaffari, A. (2017) An Investigation of the Impact of Effective Factors on the Success of E-Commerce in Small- and Medium-Sized Companies. Computers in Human Behavior, 66, 67-74. https://doi.org/10.1016/j.chb.2016.09.026
[2] Yu, W., Hou, G. and Li, J. (2019) Supply Chain Joint Inventory Management and Cost Optimization Based on Ant Colony Algorithm and Fuzzy Model. Tehnicki Vjesnik, 26, 1729-1737. https://doi.org/10.17559/TV-20190805123158
[3] Zhou, H., Ding, D.Y., Li, Y.L. and Wu, M.J. (2016) Research on Inventory Demand Forecast Based on BP Neural Network. Information Technology, 40, 38-41. (In Chinese)
[4] Wang, L., Zhang, Q., Huang, G. and Tian, J. (2017) GPS Satellite Clock Bias Prediction Based on Exponential Smoothing Method. Geomatics and Information Science of Wuhan University, 42, 995-1001. (In Chinese)
[5] Ozturk, S. and Ozturk, F. (2018) Forecasting Energy Consumption of Turkey by Arima Model. Journal of Asian Scientific Research, 8, 52-60. https://doi.org/10.18488/journal.2.2018.82.52.60
[6] Wang, Q., Zheng, J., Qin, J. Q. and Jia, C.Z. (2002) The Modeling Method Study of Fault Fuzzy Forecast System. Computer Automated Measurement & Control, 10, 23-24. (In Chinese)
[7] Hussain, M., Shome, A. and Lee, D.M. (2012) Impact of Forecasting Methods on Variance Ratio in Order-up-to Level Policy. International Journal of Advanced Manufacturing Technology, 59, 413-420. https://doi.org/10.1007/s00170-011-3485-1
[8] Snyder, R.D., Koehler, A.B., Hyndman, R.J. and Ord, J.K. (2004) Exponential Smoothing Models: Means and Variances for Lead-Time Demand. European Journal of Operational Research, 158, 444-455. https://doi.org/10.1016/S0377-2217(03)00360-6
[9] Beutel, A.-L. and Minner, S. (2012) Safety Stock Planning under Causal Demand Forecasting. International Journal of Production Economics, 140, 637-645. https://doi.org/10.1016/j.ijpe.2011.04.017
[10] Basallo-Triana, M.J., Rodriguez-Sarasty, J.A. and Benitez-Restrepo, H.D. (2017) Analogue-Based Demand Forecasting of Short Life-Cycle Products: A Regression Approach and a Comprehensive Assessment. International Journal of Production Research, 55, 2336-2350. https://doi.org/10.1080/00207543.2016.1241443
[11] González Perea, R., Poyato, E.C., Montesinos, P. and Rodríguez Díaz, J.A. (2019) Optimisation of Water Demand Forecasting by Artificial Intelligence with Short Data Sets. Biosystems Engineering, 177, 59-66. https://doi.org/10.1016/j.biosystemseng.2018.03.011
[12] Viedma, D.T., Rivas, A.J.R., Ojeda, F.C. and Jesus Díaz, M.J.D. (2018) An Approximation to Deep Learning Touristic-Related Time Series Forecasting. In: Yin, H., Camacho, D., Novais, P. and Tallón-Ballesteros, A., Eds., Intelligent Data Engineering and Automated Learning—IDEAL 2018. Lecture Notes in Computer Science, Vol. 11314, Springer, Cham, 448-456. https://doi.org/10.1007/978-3-030-03493-1_47
[13] Zhao, M. and Zhou, K. (2019) Selective Offloading by Exploiting ARIMA-BP for Energy Optimization in Mobile Edge Computing Networks. Algorithms, 12, Article No. 48. https://doi.org/10.3390/a12020048
[14] Malik, M. and Hussain, A. (2017) Helpfulness of Product Reviews as a Function of Discrete Positive and Negative Emotions. Computers in Human Behavior, 73, 290-302. https://doi.org/10.1016/j.chb.2017.03.053
[15] Jin, F., Li, Y., Sun, S., Li, H. and Graham, A. (2020) Forecasting Air Passenger Demand with a New Hybrid Ensemble Approach. Journal of Air Transport Management, 83, Article ID: 101744. https://doi.org/10.1016/j.jairtraman.2019.101744
[16] Shen, L., Li, F., Li, C., Wang, Y., Qian, X., Feng, T. and Wang, C. (2020) Inventory Optimization of Fresh Agricultural Products Supply Chain Based on Agricultural Superdocking. Journal of Advanced Transportation, 2020, Article ID: 2724164. https://doi.org/10.1155/2020/2724164
[17] Ibrahim, M., Jemei, S., Wimmer, G. and Hissel, D. (2016) Nonlinear Autoregressive Neural Network in an Energy Management Strategy for Battery/Ultra-Capacitor Hybrid Electrical Vehicles. Electric Power Systems Research, 136, 262-269. https://doi.org/10.1016/j.epsr.2016.03.005
[18] Sarkar, R., Julai, S., Hossain, S., Chong, W.T. and Rahman, M. (2019) A Comparative Study of Activation Functions of NAR and NARX Neural Network for Long-Term Wind Speed Forecasting in Malaysia. Mathematical Problems in Engineering, 2019, Article ID: 6403081. https://doi.org/10.1155/2019/6403081
[19] Ren, G., Cao, Y., Wen, S., Huang, T. and Zeng, Z. (2018) A Modified Elman Neural Network with a New Learning Rate Scheme. Neurocomputing, 286, 11-18. https://doi.org/10.1016/j.neucom.2018.01.046
[20] Bailly, S., Destors, M., Grillet, Y., Richard, P., Stach, B., Vivodtzev, I., et al. (2016) Obstructive Sleep Apnea: A Cluster Analysis at Time of Diagnosis. PLOS ONE, 11, e0157318. https://doi.org/10.1371/journal.pone.0157318

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.