forecasting of chinese e-commerce sales: an empirical
TRANSCRIPT
Research ArticleForecasting of Chinese E-Commerce Sales An EmpiricalComparison of ARIMA Nonlinear Autoregressive NeuralNetwork and a Combined ARIMA-NARNN Model
Maobin Li1 Shouwen Ji 1 and Gang Liu2
1MOE Key Laboratory for Urban Transportation Complex Systems eory and Technology Beijing Jiaotong UniversityBeijing 100044 China2Beijing Jingdong Century Trading Co Ltd Beijing 100044 China
Correspondence should be addressed to Shouwen Ji jishouwen126com
Received 2 February 2018 Revised 25 June 2018 Accepted 27 August 2018 Published 19 November 2018
Academic Editor Cornelio Posadas-Castillo
Copyright copy 2018 Maobin Li et al This is an open access article distributed under the Creative Commons Attribution Licensewhich permits unrestricted use distribution and reproduction in any medium provided the original work is properly cited
With the rapid development of e-commerce (EC) and shopping online accurateand efficient forecasting of e-commerce sales (ECS)is very important for making strategies for purchasing and inventory of EC enterprisesAffectedbymany factors ECS volume rangevaries greatly and has both linear and nonlinear characteristics Three forecast models of ECS autoregressive integrated movingaverage (ARIMA) nonlinear autoregressive neural network (NARNN) and ARIMA-NARNN are used to verify the forecastingefficiency of the methods Several time series of ECS from Chinarsquos Jingdong Corporation are selected as experimental data Theresult shows that the ARIMA-NARNNmodel is more effective than ARIMA and NARNNmodels in forecasting ECSThe analysisfound that the ARIMA-NARNNmodel combines the linear fitting of ARIMA and the nonlinear mapping of NARNN so it showsbetter prediction performance than the ARIMA and NARNNmethods
1 Introduction
In recent years e-commerce has developed rapidly in ChinaThe forecasting of ECS greatly affects inventory ordering andlogistics strategies so it is very important for e-commerceenterprises to predict the ECS accurately [1] In terms ofthe lifecycle of EC its sales present the stages of growthstability and decline whereas in the short term the sales areaffected by price promotions evaluations and descriptionsonline product life cycle season ranking online etc Thereis a dramatic fluctuation in ECS volume and the ECS showsa linear trend of increase or decrease in a specific periodof time but certain phases may show the characteristicsof nonlinear fluctuation because of various potential uncer-tainties Therefore it is critical for the forecasting of ECSto find a prediction method that is suitable for the mixedcharacteristics of both the linear and nonlinear changes
The prediction studies of ARIMA and NARNN modelsin other areas [2ndash7] found that ARIMA fits and forecastsbetter when the time series data shows a clear linear trend
otherwise the prediction becomes less accurate or even lowerthan the confidence requirements while the NARNNmodelshows a better prediction performance for nonlinear changesin the data
In view of the above characteristics of the ARIMA andNARNN models as well as the mixed characteristics of ECSchange both linearly and nonlinearly we propose to establishthe ARIMA-NARNN hybrid model to predict the ECS
At first we gained the real sales data of a single foodproduct in Jingdong Company of China and preprocessedand divided the data set into an experimental set and a testsetThenwe respectively used theARIMANARNN and theARIMA-NARNNhybrid models to fit based on experimentalset data and predict sales of the single food product for thenext few weeks Finally we compare fitting accuracy of thethree models with the same experimental data and predictionaccuracy in the test data In order to prove the universalsuperiority of our proposed hybrid model in the e-commerceindustry weekly sales data for a total of 60 e-commerceproducts was used for our empirical analysis Finally the
HindawiMathematical Problems in EngineeringVolume 2018 Article ID 6924960 12 pageshttpsdoiorg10115520186924960
2 Mathematical Problems in Engineering
research shows that the ARIMA-NARNN hybrid model issuperior to the ARIMA and NARNNmodels for the ECS weselected This research has certain reference value to the ECenterprises in the forecast of ECS demand control of stockand development of logistics strategy
In fact ARIMA NARNN and ARIMA-NARNN havebeen studied in many industries such as agriculture andforestry [2] healthcare [3 5] geography [4] manufacturing[6] and offline retail [7] Some of these studies [2ndash5] onlyanalyzed a single time series to reach conclusions and some[6 7] only conducted empirical analysis of the hybrid modeland did not compare the ARIMA NARNN and ARIMA-NARNN to prove the effectiveness of the hybrid modelThe innovativeness of this paper is to do a comparativestudy between the ARIMA NARNN and ARIMA-NARNNmethods combining the characteristics of the e-commerceindustry The empirical analysis of multiple time series ofmultiple e-commerce products is used to verify the universalsuperiority of the ARIMA-NARNNmodel we propose
The remainder of this paper is organized as followsSection 2 is about the relevant literature review ARIMA andNARNN are introduced and the ARIMA-NARNN modelfor forecasting of ECS is proposed in Section 3 Relateddescription of the real case study is presented in Sec-tion 4 The conclusion and further research directions are inSection 5
2 Literature Review
There are a large number of studies on the prediction of thesales volume of e-commerce products which mainly includetime series causal regression andmachine learningmethodsOn time series forecasting Dai W et al [8] studied theprediction of the clothing sales volume in Taobao based onstructure time series model and Taobao search data In thisresearch they explored a real-time prediction method ofclothing sales volume using structure time series model andwebsite search data For the regression prediction Peng Geng[9] predicted the e-commerce transaction volume based ononline keywords search word frequency and other data aswell as the classification of commodities Jian-hong YU et al[10] studied Amazonrsquos sales forecast Based on the historicaldata of Amazon the authors used exponential smoothingtime series decomposition and ARIMA models to predictsales They found that the exponential smoothing forecast isthe worst while the ARIMA is best As for machine learn-ing prediction Yu Miao [11] studied the extreme learningmachine (ELM) neural network taking into account seasonscategories holidays and other factors in the forecastingof medium-term sales of clothes Weng Yingjing [12] useda back propagation (BP) neural network to predict salesonline Philip Doganis et al [13] constructed a frameworkof combining genetic algorithms with a radial basis function(RBF) neural network model to analyze and predict sales ofperishable food and its predictive performance and efficiencywere demonstrated in the practice of several large companiesin the Athens dairy industry Franses PH [14] combinedexpert prediction and model prediction to accurately predict
the stock keeping unit (SKU) level of drug products andthen proved that the effect of the hybrid model is better thaneither model alone Weng Y and Feng H [15] established theBP neural network using variables such as the number ofusers the conversion rate the unit price and the number ofcollections and verified the accuracy and validity of themodelby using sales data from Alibaba
The above methods do have effects on the prediction ofECS The causal regression and machine learning methodsrequire a large number of explanatory variables such as thenumber of clicks and visits the favorable rate and even theconsumer information However there are many kinds ofproducts involved in the e-commerce sales and the sales ofdifferent kinds of products are affected by different factorsTherefore it is a waste of time and energy to establish aforecastingmodel by collecting a large number of explanatoryvariables and it also does notmeet the requirement of a quickprediction whereas the time series model only needs time asan explanatory variable and if it can achieve an acceptableprediction accuracy it will be very suitable for predictionof ECS Therefore we selected the time series method topredict
Previous studies show that ARIMA and NARNNapproaches have better prediction performance in timeseries prediction [16ndash24] For example Cheng C and QinP [16] used the ARIMA model to predict the time seriesdata of settlement of seawalls and got higher accuracy thanthe gray prediction Also Bonetto R and Rossi M [24]used the NARNN model to predict the power demand andget a good predictive effect In time series prediction ofECS currently most scholars [16ndash25 25ndash31] mainly use themethods of moving average exponential smoothing timeregression or ARIMA alone while the ARIMA NARNNand ARIMA-NARNN combined models have not yet beenused to predict and analyze comparisons in the e-commerceindustry
However in the e-commerce industry the types of prod-ucts are very numerous that is to say there are more thanone time series to be predicted Moreover the sales volumeof e-commerce products fluctuates greatly and is easy to beaffected by many factors such as price promotion rankingetc In addition the prediction of e-commerce requirestimeliness Therefore the mechanism and approaches forpredicting e-commerce sales should be reformulated
3 Methodology
31 ARIMA for ECS Forecasting
311 Basic eory and Assumptions ARIMA (p d q) iscalled autoregressive integratedmoving average [25] ARIMA(p d q) is used in the e-commerce sales forecasting tobuild the ECS-ARIMA forecasting model where AR is anautoregressive and p is an autoregressive term MA is movingaverage q is the moving average term and d is the numberof differentials made when the time series of ECS becomestable
The basic assumptions of the ECS-ARIMA forecastingmodel are as follows
Mathematical Problems in Engineering 3
y(t) 13 W
b
f W
b
f
Hidden Layer with Delays
1
l = 17 1
y(t)
1
Output Layer
Hj
Figure 1 Example of the NARNN with one input one hidden layer with 17 neurons and one output layer with one output neuron and oneoutput
(1)The time series of ECS follow the basic assumptions ofthe traditional ARIMAmodel
(2) Abnormal data including promotions will be dis-carded or smoothed out
(3) The time series of ECS can become a stationarysequence with a finite difference
(4) Presales of EC are not considered in the ECS-ARIMAforecasting model
(5) The e-commerce company as a research object oper-ates continuously
The ECS-ARIMA forecasting model includes the movingaverage process (MA) the autoregressive process (AR) theautoregressive moving average process (ARMA) and theARIMA process depending on whether the time series ofECS is stable or not and what the regression contains
312 Moving Average MA (q) A qth-order moving averageprocess MA (q) is expressed as follows
119884119905 = 119906 + 120576119905 + 1205791120576119905minus1 + 1205792120576119905minus2 + sdot sdot sdot + 120579119902120576119905minus119902 (1)
where 119884119905 is the current value of ECS u is a constant term120576119905 is the white noise sequence of ECS and 1205791 1205792 120579q arethe moving average coefficient
313 Autoregression AR (p) A pth-order autoregressiveprocess AR (p) is expressed as follows
119884119905 = 119888 + 1206011119884119905minus1 + 1206012119884119905minus2 + sdot sdot sdot + 120601119901119884119905minus119901 + V119905 (2)
where 119884119905minus1 119884119905minus2 119884119905minus119901 are respectively the value thatlag 1st-order 2nd-order and pth-order of the ECS timeseries c is a constant term and V119905 is a white noise process314e Autoregressive Moving Average ARMA (p q) If theMA(q) process ismergedwith theAR (p) process theARMA(p q) process can be obtained which is in the form as follows
119884119905 = 119888 + 1206011119884119905minus1 + 1206012119884119905minus2 + sdot sdot sdot + 120601119901119884119905minus119901 + 1205791120576119905minus1+ 1205792120576119905minus2 + sdot sdot sdot + 120579119902120576119905minus119902 + 120576119905 (3)
where the meaning of each parameter is the same as thosementioned above
315 Autoregressive Integrated Moving Average ARIMA(pd q) A time series can be transformed into a stationary
sequence by one or more differences If a time series of ECS119884119905 is transformed into a stationary sequence 119882119905 with ddifferences 119884119905 is a nonstationary sequence of d order TheARMA (p q) process is established for 119882119905 in this way 119882119905is a ARMA (p q) process and 119884119905 is an ARIMA(p d q)process
316 Seasonal Autoregressive Integrated Moving AverageWhen the time series of e-commerce sales are both trendyand seasonal the series has a correlation that is an integermultiple of the seasonal period It requires that some appro-priate stepwise differencing and seasonal differencing of theseries is usually performed to make the series stationarywhich should adopt the SARIMA(p d q)(PDQ)s modelfor this kind of time series where P Q are the seasonalautoregressive and moving average orders D is the seasonaldifferencing order and s is a seasonal cycle pdq are same asthe ARIMA (pdq) mentioned in Section 311
The (S)ARIMA model is good at linear fitting and fore-casting because it is both linear combination of the historicaldata set residuals and the linear regression of the time serieslag items no matter in the MA AR or ARMA process
32 NARNN for ECS Forecasting
321 Basic eory NARNN is called nonlinear autoregres-sive neural network [26] The NARNN is used in forecastingof ECS to build an ECS-NARNN forecasting model Themodel can continuously learn and train based on past valuesof a given time series of ECS to predict future valueswhich has good memory function The components of theECS-NARNN model include the input neuron(s) the inputlayer(s) the hidden layer(s) the output layer(s) and theoutput neuron(s) The basic framework is as shown inFigure 1
Figure 1 shows an example NARNN y(t) is the inputand output of the neural network that is the time seriesof e-commerce sales 119867119895 is the output of hidden layer 1n represents the delay order (1 3 shown in the figure) inwhich the 1 n can be calculated by formula and obtained byconstantly trying w is the link weight b is the threshold 119897 isthe number of hidden layer neurons and f is the activationfunction of the hidden and output layer
The basic assumptions of the ECS-NARNN forecastingmodel are as follows
4 Mathematical Problems in Engineering
(1)The time series of ECS follow the basic assumptions ofthe traditional NARNNmodel
(2) Other basic assumptions are the same as the assump-tions (2) - (5) in Section 311 of ECS-ARIMA model
It can be described as follows
119910 (119905) = 1198860 + 1198861119910 (119905 minus 1) + 1198862119910 (119905 minus 2) + 1198863119910 (119905 minus 3) + sdot sdot sdot+ 119886119899119910 (119905 minus 119899) + 119890 (119905)) (4)
where 119910(119905) 119910(119905 minus 1) 119910(119905 minus 2) 119910(119905 minus 3) 119910(119905 minus 119899) arerespectively the value lag 0-order 1st-order and nth-order of the ECS sequence and e(t) is white noise It can beseen from the equation that the output at the next momentdepends on the last n moments
Based on the principle of autoregression the followingNARNN are used in the model
119910 (119905) = 119891 (119910 (119905 minus 1) 119910 (119905 minus 2) 119910 (119905 minus 3) 119910 (119905 minus 119899)) (5)
Delay in the ECS-NARNN is the time delay of the outputsignal Because it is a regression based on its own data theECS-NARNN takes the output time delay as the input of thenetwork and calculates the output of the network from thehidden layer and the output layerThe input signal of networkis represented by119910119894The hidden layer calculates the output119867119895of each neuron based on the connection weight 119908119894119895 and thethreshold 119887119894 between the input data and hidden layer neurons
119867119895 = 119891( 119899sum119894=1
119908119894119895y119894 + 119887119895) 119895 = 1 2 119897 (6)
where119867119895 is the output of the jth neuron in hidden layeri is the ith input e-commerce sales data n is the number ofinput e-commerce sales j is the jth hidden layer neuron 119897is the number of hidden layer neurons f is the activationfunction of the hidden layer 119910119894 is the input of the ECS timeseries of the network 119908119894119895 is the connection weight betweenthe ith output delay signal and the jth neuron of the hiddenlayer and 119887119894 is the threshold of the jth hidden neuron
The output layer gets the output 119910(119905) of the networkthrough a linear calculation based on the output 119867119895 of thehidden layer
119910 (119905) = 119891( 119897sum119895=1
119867119895119908119895 + 119887) (7)
where 119910(119905) is the output of the network f is the activationfunction of the output layer 119908119895 is the connection weightbetween the jth neuron in the hidden layer and the neuronin the output layer and 119887 is the threshold of output layerneurons
322 Forecasting of the ECS-NARNN Model NARNN pre-dictions in ECS-NARNN are recursive The main idea of thismethod is to recycle 1st-step forward predictive value Thebasic idea is that as for the NARNN model y(119905119899) = 119891(119910(119905119899 minus1) 119910(119905119899 minus 2) 119910(119905119899 minus 119889)) the first prediction value y(119905119899)canbe obtained when k=1 when it is added to the original
samples (119910(119905119899minus119889) 119910(119905119899minus2) 119910(119905119899minus1)) a new sample y(119905119899+1) can be obtained for the two-step prediction value y(119905119899+1)then we use the nonparametric model to get the new samples(119910(119905119899 minus 119889) 119910(119905119899 minus 2) 119910(119905119899 minus 1) y(119905119899) y(119905119899 + 1)) repeatingthis continuous cycle until k is reached Since the informationcontained in y(119905119899) y(119905119899 + 1) y(119905119899 + 119896 minus 1) is used forthe prediction of the kth step (kgt1) the recursive predictionmethod is better than the direct prediction method
It can be seen that the ECS-NARNN can perform non-linear autoregressive prediction based on time series lagvalues and the NARNN and all-regression neural networkcan transform each other so the ECS-NARNNhas significantperformance in nonlinear mapping and prediction
33 e ARIMA-NARNN Combined Model Based on theabove basic theories of the ARIMA and NARNN models atime series of ECS 119910119905 can be considered as comprising a linearautocorrelation structure 119871 119905 and a nonlinear component 119873119905Therefore 119910119905 can be expressed as119910119905 = 119871 119905 + 119873119905 (8)
The basic assumptions of the ARIMA-NARNNcombinedmodel are as follows
(1) The ECS-ARIMAmodel can fully extracted the linearcomponent of the time series of ECS
(2)The fitting residues of the ECS-ARIMAmodel containa great deal of the nonlinear component in the time series ofECS
(3) Other basic assumptions are the same as the assump-tions (2)-(5) in Section 311 of ECS-ARIMAmodel
The steps of the ARIMA-NARNN combined model topredict are as follows
Step 1 The linear component119871 119905 is predicted bymodeling andforecasting the true time series of ECS119910119905 by using theARIMAmodel
Step 2 The predicted residuals of the ARIMA model areobtained by
119890119905 = 119910119905 minus 119905 (9)
The sequence 119890119905 implies a nonlinear relationship in theoriginal time series
119890119905 = 119891 (119890119905minus1 119890119905minus2 119890119905minus119899) + 1205761015840119905 (10)
where 1205761015840119905 is a random error 119890119905minus1 119890119905minus2 sdot sdot sdot 119890119905minus119899 are respec-tively the value lag 1st-order 2nd-order and nth-order of119890119905 and 119891 is the nonlinear autoregressive function
Step 3 The NARNN model is used to approximate thenonlinear function 119891 and then the sequence 119890119905 is predictedwith the NARNNmodel We set the predicted result as 119905Step 4 Combining the twomodels the final prediction resultof the ARIMA-NARNN combined model is as follows 119910119905 isthe predicted sequence of ECS time series data
119910119905 = 119905 + 119905 (11)
The above process is shown in Figure 2
Mathematical Problems in Engineering 5
ECS-ARIMA
Time series historical data
Residual sequence ECS-NAR
Forecast result
Forecast result
ARIMA-NAR combined model
Figure 2 The ARIMA-NARNN combined model principle
34 Predictive Evaluation Method We use the mean relativeerror (MRE) correlation coefficient R2 and root meansquare error (RMSE) to evaluate the accuracy of fitting andprediction of each model [27]
119872119877119864 = 1119899119899sum119894=1
1003816100381610038161003816119910119894 minus 1199101198941003816100381610038161003816119910119894 times 100 (12)
1198772 = 119899sum119899119894=1 119910119894119910119894 minus sum119899119894=1 119910119894 sum119899119894=1 119910119894radic119899sum119899119894=1 1199102119894 minus (sum119899119894=1 119910119894)2radic119899sum119899119894=1 1199102119894 minus (sum119899119894=1 119910119894)2 (13)
119877119872119878119864 = radic119872119878119864 = radic 1119899119899sum119894=1
(119910119894 minus 119910119894)2 (14)
where 119910119894 is the true value of ECS 119910119894 is the predictive valueof ECS and n is the number of ECS samples
4 Case Study
We selected a total of 60 types of e-commerce items fromthe Jingdong Company in China as an empirical researchobject The types of items include food beverages householdappliances fresh food household goods baby productstoys home textiles clothing footwear etc Each time seriesof e-commerce items we selected is from January 2014 toMarch 2017 a total of 167 weekly sales data sets for onetime series Outliers due to promotions and price changeswill be removed and reinterpolated Then based on thepreprocessed data the ECS-ARIMA ECS-NARNN and theARIMA-NARNN combined models are respectively used topredict the ECS that we selected and finally the predictionerrors of the three models are compared by using (12) and(14)
For this time series a total of 167 weekly sales data setswere used formodeling and forecasting and the top 85 (iea total of 142 sets of weekly sales data from January 06 2014to September 19 2016)were selected as themodel training setThe last 15 (ie a total of 25 sets of weekly sales data fromSeptember 26 2016 to March 13 2017) were used as a test setA two-sided P value of le 005 was regarded as significant
In order to fully demonstrate the process of the casestudy from Sections 41ndash43 a time series (e-commerce salesdata for a single food item) was selected as the object to
0
100
200
300
400
01 04 07 10 01 04 07 10 01 04 072014 2015 2016
Figure 3 Original time series graph of a single food item
be described In Section 44 the results of a comprehensiveanalysis of 60 time series consisting of 60 e-commerceproducts will be presented
41 ARIMA for ECS Forecasting Based on Eviews 80 soft-ware the ARIMA model is used to predict to the ECS Atfirst the ECS model training set is plotted as Figure 3 Thissequence shows dramatic fluctuations with some tendencyand the possible seasonality therefore the (S)ARIMA pro-cess is considered for this time series
The nonstationary sequence shown in Figure 3 is differ-entiated and the stationarity test of differential sequence isperformed using the augmented dickey-fuller (ADF) test
From Table 1 the first-order differential sequence is astationary sequence at a significant level of 005 so d = 1 andD = 0 in the ECS-ARIMA model
From Figure 4 both graphs are trailing And possible(S)ARIMAmodels are identified by Eviews and the best oneis selected as SARIMA (2 1 3)(1 0 1)52 Finally we use Eviewsto predict the total 25weekly sales data of the test sample fromSeptember 26 2016 to March 13 2017 The predicted resultsare in Figure 5
42 NARNN for ECS Forecasting We use neural networktoolbox of Matlab2014b to construct a NARNN structure anduse the trial-and-error method to construct the model with
6 Mathematical Problems in Engineering
Autocorrelation Partial Correlation AC PAC Q-Stat Prob
Figure 4 Autocorrelation and partial autocorrelation functions graph of the first-order differential sequence
Table 1 ADF test of first-order differential sequence
Null Hypothesis D(DLOGDATA) has a unit rootExogenous ConstantLag Length 5 (Automatic - based on SIC maxlag=13)
t-Statistic Problowast
Augmented Dickey-Fuller test statistic -1036760 00000Test critical values 1 level -3479656
5 level -288307310 level -2578331
the number of hidden layer neurons from5 to 40 respectively(debugging shows that when the number of neurons exceeds40 network training time will become longer) The analysisshows that the goods needed to predict for Jingdong is toomuch not suitable for an extended training time that is aftermore than 40 model predictive performance improvementis not enough to make up for the training time loss Sinceinput weights and thresholds directly affect the performanceof the neural network each model is trained 10 timesand the root mean square error (RMSE) and the decisioncoefficient 1198772 of training results are recorded as shown inFigure 6
From Figure 6 as the number of hidden neuronsincreases RMSE decreases firstly and 1198772 increases A changeto the opposite direction begins to occur after reaching20 indicating that as the number increases the tendencyto coordinate results in reduced ability to generalize and
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
Wee
kly
sale
s
Actual valuePrediction from ARIMA
Figure 5 Real values and ARIMAmodel predictive values
finally get the best number of hidden layer neurons of17 Network training and debugging results are shown inFigures 7 and 8
From Figure 7 only the confidence interval of the errorautocorrelation coefficient exceeds 95 when the delay lagorder is 0 The correlation coefficients of the other ordersare within 95 confidence intervals and then the relevanceof information has been fully extracted This illustrates this
Mathematical Problems in Engineering 7
3448
2346
18591978
2459
29062435
2182
0
5
10
15
20
25
30
35
40
5 10 15 20 25 30 35 40
MSE
Hidden layer neurons number
07312
08354
0880909134
08597
0785208109
08447
06
065
07
075
08
085
09
095
5 10 15 20 25 30 35 40Hidden layer neurons number
R^2
Figure 6 MSE and 1198772 under different hidden neurons
Lag
minus500
0
500
1000
1500
2000
2500
Cor
rela
tion
Autocorrelation of Error 1
CorrelationsZero CorrelationConfidence Limit
minus20 minus15 minus10 minus5 0 5 10 15 20
Figure 7 The network residual autocorrelation map when thenumber of hidden neurons is 17
model is for purpose and then get the error graph shown inFigure 8
The final result is shown in Figure 9
43 ARIMA-NARNN for ECS Forecasting ARIMA-NARNNcombination prediction ismainly completed by the following
(1) Calculating the residual sequence 119890119905 = 119910119905 minus 119871 119905(2) Using the NARNN prediction to obtain the predicted
sequence value 119873119905 of the nonlinear prediction part based onthe obtained residual sequence 119890119905
(3) Calculating the sales forecast result 119910119905 = 119871 119905 + 119873119905 ofthe ARIMA-NARNN model based on the prediction resultsof ARIMA model in 41 and the nonlinear part residualprediction values obtained in (2)
From Figure 10 only the autocorrelation coefficient ofthe error whose delay lag order is 0 exceeds 95 confidenceintervals The autocorrelation coefficients of the other ordersare within 95 confidence intervals and fluctuate around the0 value indicating that the model is reasonable and credibleAt the same time its model error is shown in Figure 11
minus100
0
100
200
300
400
500
Out
put a
nd T
arge
t
Response of Output Element 1 for Time-Series 1
20 40 60 80 100 120 140 160Time
20 40 60 80 100 120 140 160Time
minus500
0
500
Erro
r
Training TargetsTraining OutputsValidation TargetsValidation Outputs
Test TargetsTest OutputsErrorsResponse
Targets - Outputs
Figure 8 The error graph of the NARNN fitting model
The errors of NARNN are shown in Figure 11 The errorsof training set verification set and test set vary little withtime and the residuals in the previous period are close tozero In the later period although the residuals have becomebigger than before the overall error is within the acceptablerange and fluctuates around the zero value indicating that theestablished neural network model is credible and can be usedfor prediction of future residuals So based on this networkthe forecast result is shown in Figure 12
This article uses weekly sales data from January 062014 to September 19 2016 as the experimental set datafrom September 26 2016 to January 13 2017 as a test setusing the MRE and RMSE to compare the fitting error
8 Mathematical Problems in Engineering
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from NARNN
Figure 9 Actual values and predicted values from ECS-NARNN
Lag
minus400minus200
0200400600800
1000120014001600
Cor
rela
tion
Autocorrelation of Error 1
CorrelationsZero CorrelationConfidence Limit
minus20 minus15 minus10 minus5 0 5 10 15 20
Figure 10 Error correlation diagram of using NARNN to fit theresidual of ARIMA
and prediction error of ECS-ARIMA ECS-NARNN andARIMA-NARNN combined model and then evaluate thepredictive performance of each model
The predicted and actual values of the three models arecompared as shown in Figure 13
From Figure 13 the predicted value of the three modelsin the test set fits well with the real value and the predictionperformance is also good The ARIMA-NARNN model hasa higher fitting degree for predicted values and real valuesHowever the result is only for a single time series in orderto verify the universal superiority of the ARIMA-NARNNmodel the same analysis process will be performed for theother 59 time series of different e-commerce items sales Thetypes of items include food beverages household appliancesfresh food household goods baby products toys hometextiles clothing footwear etc
minus200minus150minus100minus50
050
100150200250
Out
put a
nd T
arge
t
Response of Output Element 1 for Time-Series 1
Training TargetsTraining OutputsValidation TargetsValidation Outputs
Test TargetsTest OutputsErrorsResponse
20 40 60 80 100 120 140 160Time
20 40 60 80 100 120 140 160Time
minus2000
200400
Erro
rTargets - Outputs
Figure 11 Error of using NARNN to fit the residual of ARIMA
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from ARIMA-NARNN
Figure 12 The prediction of using ARIMA-NARNN combinedmodel and actual values
44 Model Comparison and Discussion In the 60 time seriesof different e-commerce products the trend and season-ality of them are not exactly the same For different timeseries features different analysis methods (ie ARIMA orSARIMA) will be usedThe final analysis results are shown inFigure 14
It can be seen in Figure 14 that the RMSE of ARIMA-NARNN is generally lower than that of ARIMAandNARNNIn order to quantitatively compare the effects of the threemodels average of the MRE and RMSE for 60 e-commerce
Mathematical Problems in Engineering 9
Table 2 Average of the MRE and RMSE for 60 e-commerce products of fitting and prediction
Model Fitting error Prediction errorMRE RMSE MRE RMSE
ARIMA 00998 283451 01389 318082NARNN 00879 191893 01016 255668ARIMA-NARNN 00703 129549 009012 232321
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from ARIMAPrediction from NARNNPrediction from ARIMA-NARNN
Figure 13 Actual values and the predicted values from the threemodels
products of fitting and prediction was calculated by using (12)and (14) Table 2 shows the calculation results
The fitting and forecasting performance of the threemodels for Jingdongrsquos weekly sales data is shown in Table 2It can be seen that both the MRE and RMSE of the ARIMA-NARNN combined model are the lowest in model fitting andmodel prediction Therefore the ARIMA-NARNN combina-tion model is the best the ECS-NARNN is the second andthe ECS-ARIMA model is the worst
5 Conclusion
The ECS studied in this paper often has two characteristicslinearity and nonlinearity We choose the e-commerce salestime series of many single products from Jingdong Companyin China as empirical analysis data sets and forecast thetime series of weekly sales by ECS-ARIMA model Wefind that the model has good adaptability to the linearpatterns of e-commerce sales and low fitness to nonlinearpatterns which has a big local error When ECS-NARNNmodel is used to predict it is found that the model canwell realize the nonlinear mapping process However itis easy to cause underfitting and overfitting because ofpoor control of the model structure and the prediction oflinear components is not as effective as the ECS-ARIMAmodel
0 10 20 30 40 6050E-commerce product id
15
20
25
30
35
40
RMSE
ARIMANARNNARIMA-NARNN
Figure 14 RMSE of 60 time series of e-commerce products fromthe ARIMA NARNN and ARIMA-NARNNmodels
We set up the ARIMA-NARNN combined model Specif-ically we use the ECS-ARIMA model to predict linearcomponents of the time series and use the predictedresidual of the ARIMA as a nonlinear component Atlast we predict the nonlinear component by using theECS-NARNN Our case study shows that the ARIMA-NARNN outperforms the ECS-ARIMA and ECS-NARNNmodels in terms of the prediction accuracy which is welladapted to the forecasting of ECS with linear and nonlinearcharacteristics
In the actual application of EC companies the idea ofthis research can be used to forecast the sales of differenttypes of e-commerce products Depending on the salesfrequency of different types of products different forecastingdurations can be selected to use this more effective ARIMA-NARNN combined model to predict sales in a future periodof time Therefore according to this precise forecast theenterprisersquos inventory strategy and logistics strategy can bemore rationally formulated so that the entire supply chain canoperate more smoothly
Appendix
A Matlab Code
See Box 1
10 Mathematical Problems in Engineering
solved by NARNN based on matlab rawdata is a weekly sales data of chocolate of the JDCOMrawdata=dataT = tonndata(rawdatafalsefalse) lsquotrainlmrsquo is usually fastest lsquotrainbrrsquo takes longer but may be better for challenging problems lsquotrainscgrsquo uses less memory NTSTOOL falls back to this in low memory situationstrainFcn = lsquotrainbrrsquo Bayesian RegularizationfeedbackDelays = 13hiddenLayerSize = 17net = narnet(feedbackDelayshiddenLayerSize lsquoopenrsquotrainFcn)netinputprocessFcns = lsquoremoveconstantrowsrsquo lsquomapminmaxrsquo[xxiait] = preparets(netT)netdivideFcn = lsquodividerandrsquo Divide data randomlynetdivideMode = lsquotimersquo Divide up every valuenetdivideParamtrainRatio = 70100netdivideParamvalRatio = 15100netdivideParamtestRatio = 15100netperformFcn = lsquomsersquonetplotFcns = lsquoplotperformrsquo lsquoplottrainstatersquo lsquoplotresponsersquo
lsquoploterrcorrrsquo lsquoplotinerrcorrrsquo[nettr] = train(netxtxiai)y = net(xxiai)e = gsubtract(ty)performance = perform(netty)trainTargets = gmultiply(ttrtrainMask)valTargets = gmultiply(ttrvalMask)testTargets = gmultiply(ttrtestMask)trainPerformance = perform(nettrainTargetsy)valPerformance = perform(netvalTargetsy)testPerformance = perform(nettestTargetsy)view(net) Plots Uncomment these lines to enable various plotsfigure plotperform(tr)figure plottrainstate(tr)figure plotresponse(ty)figure ploterrcorr(e)figure plotinerrcorr(xe)netc = closeloop(net)[xcxicaictc] = preparets(netcT)yc = netc(xcxicaic)perfc = perform(nettcyc)[x1xioaiot] = preparets(netT)[y1xfoafo] = net(x1xioaio)[netcxicaic] = closeloop(netxfoafo)[y2xfcafc] = netc(cell(05)xicaic)nets = removedelay(net)[xsxisaists] = preparets(netsT)ys = nets(xsxisais)stepAheadPerformance = perform(nettsys)genFunction(net lsquomyNeuralNetworkFunctionrsquo)
y = myNeuralNetworkFunction(xxiai)endif (false)
genFunction(net lsquomyNeuralNetworkFunctionrsquo lsquoMatrixOnlyrsquo lsquoyesrsquo)x1 = cell2mat(x(1))xi1 = cell2mat(xi(1))y = myNeuralNetworkFunction(x1xi1)
endif (false)
gensim(net)end
Box 1
Mathematical Problems in Engineering 11
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request Seethe Appendix
Conflicts of Interest
The authors declare that they have no conflicts of interest
Acknowledgments
The study is funded by Scientific and Technological SupportProgram of the Ministry of Science and Technology ofPeoplersquos Republic of China (2014BAH23F01)
References
[1] L R Dhumne ldquoElectronic commerce a current trendrdquo Interna-tional Journal on Information Technology Management 2012
[2] X Q Zhang and S W Chen ldquoForecast of Chinas ForestationArea Based on ARIMA Modelrdquo Chinese Forestry Science ampTechnology vol 5 no 2 pp 50ndash55 2010
[3] K W Wang C Deng and J P Li ldquoHybrid methodology fortuberculosis incidence time-series forecasting based onARIMAand a NAR neural networkrdquo Epidemiology amp Infection vol 12017
[4] S Wei D Zuo and J Song ldquoImproving prediction accuracy ofriver discharge time series using aWavelet-NARartificial neuralnetworkrdquo Journal of Hydroinformatics vol 14 no 4 pp 974ndash991 2012
[5] L Yu L Zhou L Tan et al ldquoApplication of a new hybridmodel with seasonal auto-regressive integrated moving aver-age (ARIMA) and nonlinear auto-regressive neural network(NARNN) in forecasting incidence cases of HFMD in Shen-zhen Chinardquo PLoS ONE vol 9 no 6 2014
[6] T Van Calster B Baesens and W Lemahieu ldquoProfARIMA Aprofit-driven order identification algorithm for ARIMAmodelsin sales forecastingrdquo Applied So Computing vol 60 pp 775ndash785 2017
[7] P Ramos N Santos and R Rebelo ldquoPerformance of statespace andARIMAmodels for consumer retail sales forecastingrdquoRobotics and Computer-Integrated Manufacturing vol 34 pp151ndash163 2015
[8] D Wei P Geng L Ying and S Li ldquoA prediction study on e-commerce sales based on structure time series model and websearch datardquo in Proceedings of the 26th Chinese Control andDecision Conference CCDC 2014 pp 5346ndash5351 China June2014
[9] P Geng L Na and L Ben-Fu ldquoResearch on the Predictionof E-commerce Transaction Volume - Based on the PredictionModel of Search Data and Commodity Classification in Sta-tionrdquoManagement Modernization vol 2 pp 30ndash32 2014
[10] J Yu and X Le ldquoSales forecast for amazon sales based ondifferent statistics methodologiesrdquo ICEME vol 12 2016
[11] Y Miao Research on Mid - Season Sales Forecast Based onMachine Learning eory Zhejiang University of Technology2015
[12] L Ye and D D Fu ldquoExperience of He Ruoping using medicinein treating bladder tumorrdquo Journal of Zhejiang Chinese MedicineUniversity vol 39 no 1 pp 28ndash34 2015
[13] P Doganis A Alexandridis P Patrinos and H SarimveisldquoTime series sales forecasting for short shelf-life food productsbased on artificial neural networks and evolutionary comput-ingrdquo Journal of Food Engineering vol 75 no 2 pp 196ndash2042006
[14] P H Franses and R Legerstee ldquoCombining SKU-level salesforecasts from models and expertsrdquo Expert Systems with Appli-cations vol 38 no 3 pp 2365ndash2370 2011
[15] Y Weng and H Feng ldquoResearch online store sale forcast modelbased on BP neural networkrdquo Journal of Minjiang University2016
[16] P Qin and C Cheng ldquoPrediction of Seawall Settlement Basedon a Combined LS-ARIMA ModelrdquoMathematical Problems inEngineering vol 2017 Article ID 7840569 7 pages 2017
[17] Y E Shao ldquoPrediction of Currency Volume Issued in TaiwanUsing a Hybrid Artificial Neural Network andMultiple Regres-sion Approachrdquo Mathematical Problems in Engineering vol2013 Article ID 676742 9 pages 2013
[18] J Huang Y Tang and S Chen ldquoEnergy Demand ForecastingCombining Cointegration Analysis and Artificial IntelligenceAlgorithmrdquo Mathematical Problems in Engineering vol 2018Article ID 5194810 13 pages 2018
[19] J M P Menezes Jr and G A Barreto ldquoLong-term time seriesprediction with the NARX network An empirical evaluationrdquoNeurocomputing vol 71 no 16-18 pp 3335ndash3343 2008
[20] K Prabakaran C Sivapragasam C Jeevapriya and A Nar-matha ldquoForecasting Cultivated Areas And Production OfWheat In India Using ARIMA Modelrdquo Golden Researchoughts vol 3 no 3 pp 281ndash289 2013
[21] O Kaynar and S Tastan ldquoZaman serileri tahmininde arima-mlp melez modelirdquo Ataturk University Journal of EconomicsAdministrative Science 2010
[22] M Qin and Z Du Red tide time series forecasting by combiningARIMA and deep belief network Elsevier Science Publishers2017
[23] S Barak and S S Sadegh ldquoForecasting energy consumptionusing ensemble ARIMA-ANFIS hybrid algorithmrdquo Interna-tional Journal of Electrical Power amp Energy Systems vol 82 pp92ndash104 2016
[24] R Bonetto and M Rossi ldquoParallel multi-step ahead powerdemand forecasting throughNARneural networksrdquo in Proceed-ings of the 7th IEEE International Conference on Smart GridCommunications SmartGridComm 2016 pp 314ndash319 AustraliaNovember 2016
[25] M Sharafi H Ghaem H R Tabatabaee and H FaramarzildquoForecasting the number of zoonotic cutaneous leishmaniasiscases in south of Fars province Iran using seasonal ARIMAtime series methodrdquo Asian Pacific Journal of Tropical Medicinevol 10 no 1 pp 79ndash86 2017
[26] E Cadenas W Rivera R Campos-Amezcua and C HeardldquoWind speed prediction using a univariate ARIMAmodel and amultivariate NARXmodelrdquo Energies vol 9 no 2 pp 1ndash15 2016
[27] R Gamberini F Lolli B Rimini and F Sgarbossa ldquoForecastingof sporadic demand patterns with seasonality and trend com-ponents An empirical comparison between holt-winters and(s)ARIMA methodsrdquo Mathematical Problems in Engineeringvol 2010 Article ID 579010 15 pages 2010
[28] M A Rahman and L Casanovas ldquoStrategies to Predict E-Commerce Inventory and Order Planningrdquo International Jour-nal of Technology Diffusion vol 8 no 4 pp 17ndash30 2017
12 Mathematical Problems in Engineering
[29] S Li andR Li ldquoComparison of forecasting energy consumptionin Shandong China Using the ARIMA model GMmodel andARIMA-GMmodelrdquo Sustainability vol 9 no 7 2017
[30] MHAmini A Kargarian andOKarabasoglu ldquoARIMA-baseddecoupled time series forecasting of electric vehicle chargingdemand for stochastic power system operationrdquo Electric PowerSystems Research vol 140 pp 378ndash390 2016
[31] P SenM Roy andP Pal ldquoApplication ofARIMA for forecastingenergy consumption and GHG emission A case study of anIndian pig iron manufacturing organizationrdquo Energy vol 116pp 1031ndash1038 2016
Hindawiwwwhindawicom Volume 2018
MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Applied MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Probability and StatisticsHindawiwwwhindawicom Volume 2018
Journal of
Hindawiwwwhindawicom Volume 2018
Mathematical PhysicsAdvances in
Complex AnalysisJournal of
Hindawiwwwhindawicom Volume 2018
OptimizationJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
Hindawiwwwhindawicom Volume 2018
Operations ResearchAdvances in
Journal of
Hindawiwwwhindawicom Volume 2018
Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018
International Journal of Mathematics and Mathematical Sciences
Hindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018Volume 2018
Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in
Nature and SocietyHindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Dierential EquationsInternational Journal of
Volume 2018
Hindawiwwwhindawicom Volume 2018
Decision SciencesAdvances in
Hindawiwwwhindawicom Volume 2018
AnalysisInternational Journal of
Hindawiwwwhindawicom Volume 2018
Stochastic AnalysisInternational Journal of
Submit your manuscripts atwwwhindawicom
2 Mathematical Problems in Engineering
research shows that the ARIMA-NARNN hybrid model issuperior to the ARIMA and NARNNmodels for the ECS weselected This research has certain reference value to the ECenterprises in the forecast of ECS demand control of stockand development of logistics strategy
In fact ARIMA NARNN and ARIMA-NARNN havebeen studied in many industries such as agriculture andforestry [2] healthcare [3 5] geography [4] manufacturing[6] and offline retail [7] Some of these studies [2ndash5] onlyanalyzed a single time series to reach conclusions and some[6 7] only conducted empirical analysis of the hybrid modeland did not compare the ARIMA NARNN and ARIMA-NARNN to prove the effectiveness of the hybrid modelThe innovativeness of this paper is to do a comparativestudy between the ARIMA NARNN and ARIMA-NARNNmethods combining the characteristics of the e-commerceindustry The empirical analysis of multiple time series ofmultiple e-commerce products is used to verify the universalsuperiority of the ARIMA-NARNNmodel we propose
The remainder of this paper is organized as followsSection 2 is about the relevant literature review ARIMA andNARNN are introduced and the ARIMA-NARNN modelfor forecasting of ECS is proposed in Section 3 Relateddescription of the real case study is presented in Sec-tion 4 The conclusion and further research directions are inSection 5
2 Literature Review
There are a large number of studies on the prediction of thesales volume of e-commerce products which mainly includetime series causal regression andmachine learningmethodsOn time series forecasting Dai W et al [8] studied theprediction of the clothing sales volume in Taobao based onstructure time series model and Taobao search data In thisresearch they explored a real-time prediction method ofclothing sales volume using structure time series model andwebsite search data For the regression prediction Peng Geng[9] predicted the e-commerce transaction volume based ononline keywords search word frequency and other data aswell as the classification of commodities Jian-hong YU et al[10] studied Amazonrsquos sales forecast Based on the historicaldata of Amazon the authors used exponential smoothingtime series decomposition and ARIMA models to predictsales They found that the exponential smoothing forecast isthe worst while the ARIMA is best As for machine learn-ing prediction Yu Miao [11] studied the extreme learningmachine (ELM) neural network taking into account seasonscategories holidays and other factors in the forecastingof medium-term sales of clothes Weng Yingjing [12] useda back propagation (BP) neural network to predict salesonline Philip Doganis et al [13] constructed a frameworkof combining genetic algorithms with a radial basis function(RBF) neural network model to analyze and predict sales ofperishable food and its predictive performance and efficiencywere demonstrated in the practice of several large companiesin the Athens dairy industry Franses PH [14] combinedexpert prediction and model prediction to accurately predict
the stock keeping unit (SKU) level of drug products andthen proved that the effect of the hybrid model is better thaneither model alone Weng Y and Feng H [15] established theBP neural network using variables such as the number ofusers the conversion rate the unit price and the number ofcollections and verified the accuracy and validity of themodelby using sales data from Alibaba
The above methods do have effects on the prediction ofECS The causal regression and machine learning methodsrequire a large number of explanatory variables such as thenumber of clicks and visits the favorable rate and even theconsumer information However there are many kinds ofproducts involved in the e-commerce sales and the sales ofdifferent kinds of products are affected by different factorsTherefore it is a waste of time and energy to establish aforecastingmodel by collecting a large number of explanatoryvariables and it also does notmeet the requirement of a quickprediction whereas the time series model only needs time asan explanatory variable and if it can achieve an acceptableprediction accuracy it will be very suitable for predictionof ECS Therefore we selected the time series method topredict
Previous studies show that ARIMA and NARNNapproaches have better prediction performance in timeseries prediction [16ndash24] For example Cheng C and QinP [16] used the ARIMA model to predict the time seriesdata of settlement of seawalls and got higher accuracy thanthe gray prediction Also Bonetto R and Rossi M [24]used the NARNN model to predict the power demand andget a good predictive effect In time series prediction ofECS currently most scholars [16ndash25 25ndash31] mainly use themethods of moving average exponential smoothing timeregression or ARIMA alone while the ARIMA NARNNand ARIMA-NARNN combined models have not yet beenused to predict and analyze comparisons in the e-commerceindustry
However in the e-commerce industry the types of prod-ucts are very numerous that is to say there are more thanone time series to be predicted Moreover the sales volumeof e-commerce products fluctuates greatly and is easy to beaffected by many factors such as price promotion rankingetc In addition the prediction of e-commerce requirestimeliness Therefore the mechanism and approaches forpredicting e-commerce sales should be reformulated
3 Methodology
31 ARIMA for ECS Forecasting
311 Basic eory and Assumptions ARIMA (p d q) iscalled autoregressive integratedmoving average [25] ARIMA(p d q) is used in the e-commerce sales forecasting tobuild the ECS-ARIMA forecasting model where AR is anautoregressive and p is an autoregressive term MA is movingaverage q is the moving average term and d is the numberof differentials made when the time series of ECS becomestable
The basic assumptions of the ECS-ARIMA forecastingmodel are as follows
Mathematical Problems in Engineering 3
y(t) 13 W
b
f W
b
f
Hidden Layer with Delays
1
l = 17 1
y(t)
1
Output Layer
Hj
Figure 1 Example of the NARNN with one input one hidden layer with 17 neurons and one output layer with one output neuron and oneoutput
(1)The time series of ECS follow the basic assumptions ofthe traditional ARIMAmodel
(2) Abnormal data including promotions will be dis-carded or smoothed out
(3) The time series of ECS can become a stationarysequence with a finite difference
(4) Presales of EC are not considered in the ECS-ARIMAforecasting model
(5) The e-commerce company as a research object oper-ates continuously
The ECS-ARIMA forecasting model includes the movingaverage process (MA) the autoregressive process (AR) theautoregressive moving average process (ARMA) and theARIMA process depending on whether the time series ofECS is stable or not and what the regression contains
312 Moving Average MA (q) A qth-order moving averageprocess MA (q) is expressed as follows
119884119905 = 119906 + 120576119905 + 1205791120576119905minus1 + 1205792120576119905minus2 + sdot sdot sdot + 120579119902120576119905minus119902 (1)
where 119884119905 is the current value of ECS u is a constant term120576119905 is the white noise sequence of ECS and 1205791 1205792 120579q arethe moving average coefficient
313 Autoregression AR (p) A pth-order autoregressiveprocess AR (p) is expressed as follows
119884119905 = 119888 + 1206011119884119905minus1 + 1206012119884119905minus2 + sdot sdot sdot + 120601119901119884119905minus119901 + V119905 (2)
where 119884119905minus1 119884119905minus2 119884119905minus119901 are respectively the value thatlag 1st-order 2nd-order and pth-order of the ECS timeseries c is a constant term and V119905 is a white noise process314e Autoregressive Moving Average ARMA (p q) If theMA(q) process ismergedwith theAR (p) process theARMA(p q) process can be obtained which is in the form as follows
119884119905 = 119888 + 1206011119884119905minus1 + 1206012119884119905minus2 + sdot sdot sdot + 120601119901119884119905minus119901 + 1205791120576119905minus1+ 1205792120576119905minus2 + sdot sdot sdot + 120579119902120576119905minus119902 + 120576119905 (3)
where the meaning of each parameter is the same as thosementioned above
315 Autoregressive Integrated Moving Average ARIMA(pd q) A time series can be transformed into a stationary
sequence by one or more differences If a time series of ECS119884119905 is transformed into a stationary sequence 119882119905 with ddifferences 119884119905 is a nonstationary sequence of d order TheARMA (p q) process is established for 119882119905 in this way 119882119905is a ARMA (p q) process and 119884119905 is an ARIMA(p d q)process
316 Seasonal Autoregressive Integrated Moving AverageWhen the time series of e-commerce sales are both trendyand seasonal the series has a correlation that is an integermultiple of the seasonal period It requires that some appro-priate stepwise differencing and seasonal differencing of theseries is usually performed to make the series stationarywhich should adopt the SARIMA(p d q)(PDQ)s modelfor this kind of time series where P Q are the seasonalautoregressive and moving average orders D is the seasonaldifferencing order and s is a seasonal cycle pdq are same asthe ARIMA (pdq) mentioned in Section 311
The (S)ARIMA model is good at linear fitting and fore-casting because it is both linear combination of the historicaldata set residuals and the linear regression of the time serieslag items no matter in the MA AR or ARMA process
32 NARNN for ECS Forecasting
321 Basic eory NARNN is called nonlinear autoregres-sive neural network [26] The NARNN is used in forecastingof ECS to build an ECS-NARNN forecasting model Themodel can continuously learn and train based on past valuesof a given time series of ECS to predict future valueswhich has good memory function The components of theECS-NARNN model include the input neuron(s) the inputlayer(s) the hidden layer(s) the output layer(s) and theoutput neuron(s) The basic framework is as shown inFigure 1
Figure 1 shows an example NARNN y(t) is the inputand output of the neural network that is the time seriesof e-commerce sales 119867119895 is the output of hidden layer 1n represents the delay order (1 3 shown in the figure) inwhich the 1 n can be calculated by formula and obtained byconstantly trying w is the link weight b is the threshold 119897 isthe number of hidden layer neurons and f is the activationfunction of the hidden and output layer
The basic assumptions of the ECS-NARNN forecastingmodel are as follows
4 Mathematical Problems in Engineering
(1)The time series of ECS follow the basic assumptions ofthe traditional NARNNmodel
(2) Other basic assumptions are the same as the assump-tions (2) - (5) in Section 311 of ECS-ARIMA model
It can be described as follows
119910 (119905) = 1198860 + 1198861119910 (119905 minus 1) + 1198862119910 (119905 minus 2) + 1198863119910 (119905 minus 3) + sdot sdot sdot+ 119886119899119910 (119905 minus 119899) + 119890 (119905)) (4)
where 119910(119905) 119910(119905 minus 1) 119910(119905 minus 2) 119910(119905 minus 3) 119910(119905 minus 119899) arerespectively the value lag 0-order 1st-order and nth-order of the ECS sequence and e(t) is white noise It can beseen from the equation that the output at the next momentdepends on the last n moments
Based on the principle of autoregression the followingNARNN are used in the model
119910 (119905) = 119891 (119910 (119905 minus 1) 119910 (119905 minus 2) 119910 (119905 minus 3) 119910 (119905 minus 119899)) (5)
Delay in the ECS-NARNN is the time delay of the outputsignal Because it is a regression based on its own data theECS-NARNN takes the output time delay as the input of thenetwork and calculates the output of the network from thehidden layer and the output layerThe input signal of networkis represented by119910119894The hidden layer calculates the output119867119895of each neuron based on the connection weight 119908119894119895 and thethreshold 119887119894 between the input data and hidden layer neurons
119867119895 = 119891( 119899sum119894=1
119908119894119895y119894 + 119887119895) 119895 = 1 2 119897 (6)
where119867119895 is the output of the jth neuron in hidden layeri is the ith input e-commerce sales data n is the number ofinput e-commerce sales j is the jth hidden layer neuron 119897is the number of hidden layer neurons f is the activationfunction of the hidden layer 119910119894 is the input of the ECS timeseries of the network 119908119894119895 is the connection weight betweenthe ith output delay signal and the jth neuron of the hiddenlayer and 119887119894 is the threshold of the jth hidden neuron
The output layer gets the output 119910(119905) of the networkthrough a linear calculation based on the output 119867119895 of thehidden layer
119910 (119905) = 119891( 119897sum119895=1
119867119895119908119895 + 119887) (7)
where 119910(119905) is the output of the network f is the activationfunction of the output layer 119908119895 is the connection weightbetween the jth neuron in the hidden layer and the neuronin the output layer and 119887 is the threshold of output layerneurons
322 Forecasting of the ECS-NARNN Model NARNN pre-dictions in ECS-NARNN are recursive The main idea of thismethod is to recycle 1st-step forward predictive value Thebasic idea is that as for the NARNN model y(119905119899) = 119891(119910(119905119899 minus1) 119910(119905119899 minus 2) 119910(119905119899 minus 119889)) the first prediction value y(119905119899)canbe obtained when k=1 when it is added to the original
samples (119910(119905119899minus119889) 119910(119905119899minus2) 119910(119905119899minus1)) a new sample y(119905119899+1) can be obtained for the two-step prediction value y(119905119899+1)then we use the nonparametric model to get the new samples(119910(119905119899 minus 119889) 119910(119905119899 minus 2) 119910(119905119899 minus 1) y(119905119899) y(119905119899 + 1)) repeatingthis continuous cycle until k is reached Since the informationcontained in y(119905119899) y(119905119899 + 1) y(119905119899 + 119896 minus 1) is used forthe prediction of the kth step (kgt1) the recursive predictionmethod is better than the direct prediction method
It can be seen that the ECS-NARNN can perform non-linear autoregressive prediction based on time series lagvalues and the NARNN and all-regression neural networkcan transform each other so the ECS-NARNNhas significantperformance in nonlinear mapping and prediction
33 e ARIMA-NARNN Combined Model Based on theabove basic theories of the ARIMA and NARNN models atime series of ECS 119910119905 can be considered as comprising a linearautocorrelation structure 119871 119905 and a nonlinear component 119873119905Therefore 119910119905 can be expressed as119910119905 = 119871 119905 + 119873119905 (8)
The basic assumptions of the ARIMA-NARNNcombinedmodel are as follows
(1) The ECS-ARIMAmodel can fully extracted the linearcomponent of the time series of ECS
(2)The fitting residues of the ECS-ARIMAmodel containa great deal of the nonlinear component in the time series ofECS
(3) Other basic assumptions are the same as the assump-tions (2)-(5) in Section 311 of ECS-ARIMAmodel
The steps of the ARIMA-NARNN combined model topredict are as follows
Step 1 The linear component119871 119905 is predicted bymodeling andforecasting the true time series of ECS119910119905 by using theARIMAmodel
Step 2 The predicted residuals of the ARIMA model areobtained by
119890119905 = 119910119905 minus 119905 (9)
The sequence 119890119905 implies a nonlinear relationship in theoriginal time series
119890119905 = 119891 (119890119905minus1 119890119905minus2 119890119905minus119899) + 1205761015840119905 (10)
where 1205761015840119905 is a random error 119890119905minus1 119890119905minus2 sdot sdot sdot 119890119905minus119899 are respec-tively the value lag 1st-order 2nd-order and nth-order of119890119905 and 119891 is the nonlinear autoregressive function
Step 3 The NARNN model is used to approximate thenonlinear function 119891 and then the sequence 119890119905 is predictedwith the NARNNmodel We set the predicted result as 119905Step 4 Combining the twomodels the final prediction resultof the ARIMA-NARNN combined model is as follows 119910119905 isthe predicted sequence of ECS time series data
119910119905 = 119905 + 119905 (11)
The above process is shown in Figure 2
Mathematical Problems in Engineering 5
ECS-ARIMA
Time series historical data
Residual sequence ECS-NAR
Forecast result
Forecast result
ARIMA-NAR combined model
Figure 2 The ARIMA-NARNN combined model principle
34 Predictive Evaluation Method We use the mean relativeerror (MRE) correlation coefficient R2 and root meansquare error (RMSE) to evaluate the accuracy of fitting andprediction of each model [27]
119872119877119864 = 1119899119899sum119894=1
1003816100381610038161003816119910119894 minus 1199101198941003816100381610038161003816119910119894 times 100 (12)
1198772 = 119899sum119899119894=1 119910119894119910119894 minus sum119899119894=1 119910119894 sum119899119894=1 119910119894radic119899sum119899119894=1 1199102119894 minus (sum119899119894=1 119910119894)2radic119899sum119899119894=1 1199102119894 minus (sum119899119894=1 119910119894)2 (13)
119877119872119878119864 = radic119872119878119864 = radic 1119899119899sum119894=1
(119910119894 minus 119910119894)2 (14)
where 119910119894 is the true value of ECS 119910119894 is the predictive valueof ECS and n is the number of ECS samples
4 Case Study
We selected a total of 60 types of e-commerce items fromthe Jingdong Company in China as an empirical researchobject The types of items include food beverages householdappliances fresh food household goods baby productstoys home textiles clothing footwear etc Each time seriesof e-commerce items we selected is from January 2014 toMarch 2017 a total of 167 weekly sales data sets for onetime series Outliers due to promotions and price changeswill be removed and reinterpolated Then based on thepreprocessed data the ECS-ARIMA ECS-NARNN and theARIMA-NARNN combined models are respectively used topredict the ECS that we selected and finally the predictionerrors of the three models are compared by using (12) and(14)
For this time series a total of 167 weekly sales data setswere used formodeling and forecasting and the top 85 (iea total of 142 sets of weekly sales data from January 06 2014to September 19 2016)were selected as themodel training setThe last 15 (ie a total of 25 sets of weekly sales data fromSeptember 26 2016 to March 13 2017) were used as a test setA two-sided P value of le 005 was regarded as significant
In order to fully demonstrate the process of the casestudy from Sections 41ndash43 a time series (e-commerce salesdata for a single food item) was selected as the object to
0
100
200
300
400
01 04 07 10 01 04 07 10 01 04 072014 2015 2016
Figure 3 Original time series graph of a single food item
be described In Section 44 the results of a comprehensiveanalysis of 60 time series consisting of 60 e-commerceproducts will be presented
41 ARIMA for ECS Forecasting Based on Eviews 80 soft-ware the ARIMA model is used to predict to the ECS Atfirst the ECS model training set is plotted as Figure 3 Thissequence shows dramatic fluctuations with some tendencyand the possible seasonality therefore the (S)ARIMA pro-cess is considered for this time series
The nonstationary sequence shown in Figure 3 is differ-entiated and the stationarity test of differential sequence isperformed using the augmented dickey-fuller (ADF) test
From Table 1 the first-order differential sequence is astationary sequence at a significant level of 005 so d = 1 andD = 0 in the ECS-ARIMA model
From Figure 4 both graphs are trailing And possible(S)ARIMAmodels are identified by Eviews and the best oneis selected as SARIMA (2 1 3)(1 0 1)52 Finally we use Eviewsto predict the total 25weekly sales data of the test sample fromSeptember 26 2016 to March 13 2017 The predicted resultsare in Figure 5
42 NARNN for ECS Forecasting We use neural networktoolbox of Matlab2014b to construct a NARNN structure anduse the trial-and-error method to construct the model with
6 Mathematical Problems in Engineering
Autocorrelation Partial Correlation AC PAC Q-Stat Prob
Figure 4 Autocorrelation and partial autocorrelation functions graph of the first-order differential sequence
Table 1 ADF test of first-order differential sequence
Null Hypothesis D(DLOGDATA) has a unit rootExogenous ConstantLag Length 5 (Automatic - based on SIC maxlag=13)
t-Statistic Problowast
Augmented Dickey-Fuller test statistic -1036760 00000Test critical values 1 level -3479656
5 level -288307310 level -2578331
the number of hidden layer neurons from5 to 40 respectively(debugging shows that when the number of neurons exceeds40 network training time will become longer) The analysisshows that the goods needed to predict for Jingdong is toomuch not suitable for an extended training time that is aftermore than 40 model predictive performance improvementis not enough to make up for the training time loss Sinceinput weights and thresholds directly affect the performanceof the neural network each model is trained 10 timesand the root mean square error (RMSE) and the decisioncoefficient 1198772 of training results are recorded as shown inFigure 6
From Figure 6 as the number of hidden neuronsincreases RMSE decreases firstly and 1198772 increases A changeto the opposite direction begins to occur after reaching20 indicating that as the number increases the tendencyto coordinate results in reduced ability to generalize and
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
Wee
kly
sale
s
Actual valuePrediction from ARIMA
Figure 5 Real values and ARIMAmodel predictive values
finally get the best number of hidden layer neurons of17 Network training and debugging results are shown inFigures 7 and 8
From Figure 7 only the confidence interval of the errorautocorrelation coefficient exceeds 95 when the delay lagorder is 0 The correlation coefficients of the other ordersare within 95 confidence intervals and then the relevanceof information has been fully extracted This illustrates this
Mathematical Problems in Engineering 7
3448
2346
18591978
2459
29062435
2182
0
5
10
15
20
25
30
35
40
5 10 15 20 25 30 35 40
MSE
Hidden layer neurons number
07312
08354
0880909134
08597
0785208109
08447
06
065
07
075
08
085
09
095
5 10 15 20 25 30 35 40Hidden layer neurons number
R^2
Figure 6 MSE and 1198772 under different hidden neurons
Lag
minus500
0
500
1000
1500
2000
2500
Cor
rela
tion
Autocorrelation of Error 1
CorrelationsZero CorrelationConfidence Limit
minus20 minus15 minus10 minus5 0 5 10 15 20
Figure 7 The network residual autocorrelation map when thenumber of hidden neurons is 17
model is for purpose and then get the error graph shown inFigure 8
The final result is shown in Figure 9
43 ARIMA-NARNN for ECS Forecasting ARIMA-NARNNcombination prediction ismainly completed by the following
(1) Calculating the residual sequence 119890119905 = 119910119905 minus 119871 119905(2) Using the NARNN prediction to obtain the predicted
sequence value 119873119905 of the nonlinear prediction part based onthe obtained residual sequence 119890119905
(3) Calculating the sales forecast result 119910119905 = 119871 119905 + 119873119905 ofthe ARIMA-NARNN model based on the prediction resultsof ARIMA model in 41 and the nonlinear part residualprediction values obtained in (2)
From Figure 10 only the autocorrelation coefficient ofthe error whose delay lag order is 0 exceeds 95 confidenceintervals The autocorrelation coefficients of the other ordersare within 95 confidence intervals and fluctuate around the0 value indicating that the model is reasonable and credibleAt the same time its model error is shown in Figure 11
minus100
0
100
200
300
400
500
Out
put a
nd T
arge
t
Response of Output Element 1 for Time-Series 1
20 40 60 80 100 120 140 160Time
20 40 60 80 100 120 140 160Time
minus500
0
500
Erro
r
Training TargetsTraining OutputsValidation TargetsValidation Outputs
Test TargetsTest OutputsErrorsResponse
Targets - Outputs
Figure 8 The error graph of the NARNN fitting model
The errors of NARNN are shown in Figure 11 The errorsof training set verification set and test set vary little withtime and the residuals in the previous period are close tozero In the later period although the residuals have becomebigger than before the overall error is within the acceptablerange and fluctuates around the zero value indicating that theestablished neural network model is credible and can be usedfor prediction of future residuals So based on this networkthe forecast result is shown in Figure 12
This article uses weekly sales data from January 062014 to September 19 2016 as the experimental set datafrom September 26 2016 to January 13 2017 as a test setusing the MRE and RMSE to compare the fitting error
8 Mathematical Problems in Engineering
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from NARNN
Figure 9 Actual values and predicted values from ECS-NARNN
Lag
minus400minus200
0200400600800
1000120014001600
Cor
rela
tion
Autocorrelation of Error 1
CorrelationsZero CorrelationConfidence Limit
minus20 minus15 minus10 minus5 0 5 10 15 20
Figure 10 Error correlation diagram of using NARNN to fit theresidual of ARIMA
and prediction error of ECS-ARIMA ECS-NARNN andARIMA-NARNN combined model and then evaluate thepredictive performance of each model
The predicted and actual values of the three models arecompared as shown in Figure 13
From Figure 13 the predicted value of the three modelsin the test set fits well with the real value and the predictionperformance is also good The ARIMA-NARNN model hasa higher fitting degree for predicted values and real valuesHowever the result is only for a single time series in orderto verify the universal superiority of the ARIMA-NARNNmodel the same analysis process will be performed for theother 59 time series of different e-commerce items sales Thetypes of items include food beverages household appliancesfresh food household goods baby products toys hometextiles clothing footwear etc
minus200minus150minus100minus50
050
100150200250
Out
put a
nd T
arge
t
Response of Output Element 1 for Time-Series 1
Training TargetsTraining OutputsValidation TargetsValidation Outputs
Test TargetsTest OutputsErrorsResponse
20 40 60 80 100 120 140 160Time
20 40 60 80 100 120 140 160Time
minus2000
200400
Erro
rTargets - Outputs
Figure 11 Error of using NARNN to fit the residual of ARIMA
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from ARIMA-NARNN
Figure 12 The prediction of using ARIMA-NARNN combinedmodel and actual values
44 Model Comparison and Discussion In the 60 time seriesof different e-commerce products the trend and season-ality of them are not exactly the same For different timeseries features different analysis methods (ie ARIMA orSARIMA) will be usedThe final analysis results are shown inFigure 14
It can be seen in Figure 14 that the RMSE of ARIMA-NARNN is generally lower than that of ARIMAandNARNNIn order to quantitatively compare the effects of the threemodels average of the MRE and RMSE for 60 e-commerce
Mathematical Problems in Engineering 9
Table 2 Average of the MRE and RMSE for 60 e-commerce products of fitting and prediction
Model Fitting error Prediction errorMRE RMSE MRE RMSE
ARIMA 00998 283451 01389 318082NARNN 00879 191893 01016 255668ARIMA-NARNN 00703 129549 009012 232321
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from ARIMAPrediction from NARNNPrediction from ARIMA-NARNN
Figure 13 Actual values and the predicted values from the threemodels
products of fitting and prediction was calculated by using (12)and (14) Table 2 shows the calculation results
The fitting and forecasting performance of the threemodels for Jingdongrsquos weekly sales data is shown in Table 2It can be seen that both the MRE and RMSE of the ARIMA-NARNN combined model are the lowest in model fitting andmodel prediction Therefore the ARIMA-NARNN combina-tion model is the best the ECS-NARNN is the second andthe ECS-ARIMA model is the worst
5 Conclusion
The ECS studied in this paper often has two characteristicslinearity and nonlinearity We choose the e-commerce salestime series of many single products from Jingdong Companyin China as empirical analysis data sets and forecast thetime series of weekly sales by ECS-ARIMA model Wefind that the model has good adaptability to the linearpatterns of e-commerce sales and low fitness to nonlinearpatterns which has a big local error When ECS-NARNNmodel is used to predict it is found that the model canwell realize the nonlinear mapping process However itis easy to cause underfitting and overfitting because ofpoor control of the model structure and the prediction oflinear components is not as effective as the ECS-ARIMAmodel
0 10 20 30 40 6050E-commerce product id
15
20
25
30
35
40
RMSE
ARIMANARNNARIMA-NARNN
Figure 14 RMSE of 60 time series of e-commerce products fromthe ARIMA NARNN and ARIMA-NARNNmodels
We set up the ARIMA-NARNN combined model Specif-ically we use the ECS-ARIMA model to predict linearcomponents of the time series and use the predictedresidual of the ARIMA as a nonlinear component Atlast we predict the nonlinear component by using theECS-NARNN Our case study shows that the ARIMA-NARNN outperforms the ECS-ARIMA and ECS-NARNNmodels in terms of the prediction accuracy which is welladapted to the forecasting of ECS with linear and nonlinearcharacteristics
In the actual application of EC companies the idea ofthis research can be used to forecast the sales of differenttypes of e-commerce products Depending on the salesfrequency of different types of products different forecastingdurations can be selected to use this more effective ARIMA-NARNN combined model to predict sales in a future periodof time Therefore according to this precise forecast theenterprisersquos inventory strategy and logistics strategy can bemore rationally formulated so that the entire supply chain canoperate more smoothly
Appendix
A Matlab Code
See Box 1
10 Mathematical Problems in Engineering
solved by NARNN based on matlab rawdata is a weekly sales data of chocolate of the JDCOMrawdata=dataT = tonndata(rawdatafalsefalse) lsquotrainlmrsquo is usually fastest lsquotrainbrrsquo takes longer but may be better for challenging problems lsquotrainscgrsquo uses less memory NTSTOOL falls back to this in low memory situationstrainFcn = lsquotrainbrrsquo Bayesian RegularizationfeedbackDelays = 13hiddenLayerSize = 17net = narnet(feedbackDelayshiddenLayerSize lsquoopenrsquotrainFcn)netinputprocessFcns = lsquoremoveconstantrowsrsquo lsquomapminmaxrsquo[xxiait] = preparets(netT)netdivideFcn = lsquodividerandrsquo Divide data randomlynetdivideMode = lsquotimersquo Divide up every valuenetdivideParamtrainRatio = 70100netdivideParamvalRatio = 15100netdivideParamtestRatio = 15100netperformFcn = lsquomsersquonetplotFcns = lsquoplotperformrsquo lsquoplottrainstatersquo lsquoplotresponsersquo
lsquoploterrcorrrsquo lsquoplotinerrcorrrsquo[nettr] = train(netxtxiai)y = net(xxiai)e = gsubtract(ty)performance = perform(netty)trainTargets = gmultiply(ttrtrainMask)valTargets = gmultiply(ttrvalMask)testTargets = gmultiply(ttrtestMask)trainPerformance = perform(nettrainTargetsy)valPerformance = perform(netvalTargetsy)testPerformance = perform(nettestTargetsy)view(net) Plots Uncomment these lines to enable various plotsfigure plotperform(tr)figure plottrainstate(tr)figure plotresponse(ty)figure ploterrcorr(e)figure plotinerrcorr(xe)netc = closeloop(net)[xcxicaictc] = preparets(netcT)yc = netc(xcxicaic)perfc = perform(nettcyc)[x1xioaiot] = preparets(netT)[y1xfoafo] = net(x1xioaio)[netcxicaic] = closeloop(netxfoafo)[y2xfcafc] = netc(cell(05)xicaic)nets = removedelay(net)[xsxisaists] = preparets(netsT)ys = nets(xsxisais)stepAheadPerformance = perform(nettsys)genFunction(net lsquomyNeuralNetworkFunctionrsquo)
y = myNeuralNetworkFunction(xxiai)endif (false)
genFunction(net lsquomyNeuralNetworkFunctionrsquo lsquoMatrixOnlyrsquo lsquoyesrsquo)x1 = cell2mat(x(1))xi1 = cell2mat(xi(1))y = myNeuralNetworkFunction(x1xi1)
endif (false)
gensim(net)end
Box 1
Mathematical Problems in Engineering 11
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request Seethe Appendix
Conflicts of Interest
The authors declare that they have no conflicts of interest
Acknowledgments
The study is funded by Scientific and Technological SupportProgram of the Ministry of Science and Technology ofPeoplersquos Republic of China (2014BAH23F01)
References
[1] L R Dhumne ldquoElectronic commerce a current trendrdquo Interna-tional Journal on Information Technology Management 2012
[2] X Q Zhang and S W Chen ldquoForecast of Chinas ForestationArea Based on ARIMA Modelrdquo Chinese Forestry Science ampTechnology vol 5 no 2 pp 50ndash55 2010
[3] K W Wang C Deng and J P Li ldquoHybrid methodology fortuberculosis incidence time-series forecasting based onARIMAand a NAR neural networkrdquo Epidemiology amp Infection vol 12017
[4] S Wei D Zuo and J Song ldquoImproving prediction accuracy ofriver discharge time series using aWavelet-NARartificial neuralnetworkrdquo Journal of Hydroinformatics vol 14 no 4 pp 974ndash991 2012
[5] L Yu L Zhou L Tan et al ldquoApplication of a new hybridmodel with seasonal auto-regressive integrated moving aver-age (ARIMA) and nonlinear auto-regressive neural network(NARNN) in forecasting incidence cases of HFMD in Shen-zhen Chinardquo PLoS ONE vol 9 no 6 2014
[6] T Van Calster B Baesens and W Lemahieu ldquoProfARIMA Aprofit-driven order identification algorithm for ARIMAmodelsin sales forecastingrdquo Applied So Computing vol 60 pp 775ndash785 2017
[7] P Ramos N Santos and R Rebelo ldquoPerformance of statespace andARIMAmodels for consumer retail sales forecastingrdquoRobotics and Computer-Integrated Manufacturing vol 34 pp151ndash163 2015
[8] D Wei P Geng L Ying and S Li ldquoA prediction study on e-commerce sales based on structure time series model and websearch datardquo in Proceedings of the 26th Chinese Control andDecision Conference CCDC 2014 pp 5346ndash5351 China June2014
[9] P Geng L Na and L Ben-Fu ldquoResearch on the Predictionof E-commerce Transaction Volume - Based on the PredictionModel of Search Data and Commodity Classification in Sta-tionrdquoManagement Modernization vol 2 pp 30ndash32 2014
[10] J Yu and X Le ldquoSales forecast for amazon sales based ondifferent statistics methodologiesrdquo ICEME vol 12 2016
[11] Y Miao Research on Mid - Season Sales Forecast Based onMachine Learning eory Zhejiang University of Technology2015
[12] L Ye and D D Fu ldquoExperience of He Ruoping using medicinein treating bladder tumorrdquo Journal of Zhejiang Chinese MedicineUniversity vol 39 no 1 pp 28ndash34 2015
[13] P Doganis A Alexandridis P Patrinos and H SarimveisldquoTime series sales forecasting for short shelf-life food productsbased on artificial neural networks and evolutionary comput-ingrdquo Journal of Food Engineering vol 75 no 2 pp 196ndash2042006
[14] P H Franses and R Legerstee ldquoCombining SKU-level salesforecasts from models and expertsrdquo Expert Systems with Appli-cations vol 38 no 3 pp 2365ndash2370 2011
[15] Y Weng and H Feng ldquoResearch online store sale forcast modelbased on BP neural networkrdquo Journal of Minjiang University2016
[16] P Qin and C Cheng ldquoPrediction of Seawall Settlement Basedon a Combined LS-ARIMA ModelrdquoMathematical Problems inEngineering vol 2017 Article ID 7840569 7 pages 2017
[17] Y E Shao ldquoPrediction of Currency Volume Issued in TaiwanUsing a Hybrid Artificial Neural Network andMultiple Regres-sion Approachrdquo Mathematical Problems in Engineering vol2013 Article ID 676742 9 pages 2013
[18] J Huang Y Tang and S Chen ldquoEnergy Demand ForecastingCombining Cointegration Analysis and Artificial IntelligenceAlgorithmrdquo Mathematical Problems in Engineering vol 2018Article ID 5194810 13 pages 2018
[19] J M P Menezes Jr and G A Barreto ldquoLong-term time seriesprediction with the NARX network An empirical evaluationrdquoNeurocomputing vol 71 no 16-18 pp 3335ndash3343 2008
[20] K Prabakaran C Sivapragasam C Jeevapriya and A Nar-matha ldquoForecasting Cultivated Areas And Production OfWheat In India Using ARIMA Modelrdquo Golden Researchoughts vol 3 no 3 pp 281ndash289 2013
[21] O Kaynar and S Tastan ldquoZaman serileri tahmininde arima-mlp melez modelirdquo Ataturk University Journal of EconomicsAdministrative Science 2010
[22] M Qin and Z Du Red tide time series forecasting by combiningARIMA and deep belief network Elsevier Science Publishers2017
[23] S Barak and S S Sadegh ldquoForecasting energy consumptionusing ensemble ARIMA-ANFIS hybrid algorithmrdquo Interna-tional Journal of Electrical Power amp Energy Systems vol 82 pp92ndash104 2016
[24] R Bonetto and M Rossi ldquoParallel multi-step ahead powerdemand forecasting throughNARneural networksrdquo in Proceed-ings of the 7th IEEE International Conference on Smart GridCommunications SmartGridComm 2016 pp 314ndash319 AustraliaNovember 2016
[25] M Sharafi H Ghaem H R Tabatabaee and H FaramarzildquoForecasting the number of zoonotic cutaneous leishmaniasiscases in south of Fars province Iran using seasonal ARIMAtime series methodrdquo Asian Pacific Journal of Tropical Medicinevol 10 no 1 pp 79ndash86 2017
[26] E Cadenas W Rivera R Campos-Amezcua and C HeardldquoWind speed prediction using a univariate ARIMAmodel and amultivariate NARXmodelrdquo Energies vol 9 no 2 pp 1ndash15 2016
[27] R Gamberini F Lolli B Rimini and F Sgarbossa ldquoForecastingof sporadic demand patterns with seasonality and trend com-ponents An empirical comparison between holt-winters and(s)ARIMA methodsrdquo Mathematical Problems in Engineeringvol 2010 Article ID 579010 15 pages 2010
[28] M A Rahman and L Casanovas ldquoStrategies to Predict E-Commerce Inventory and Order Planningrdquo International Jour-nal of Technology Diffusion vol 8 no 4 pp 17ndash30 2017
12 Mathematical Problems in Engineering
[29] S Li andR Li ldquoComparison of forecasting energy consumptionin Shandong China Using the ARIMA model GMmodel andARIMA-GMmodelrdquo Sustainability vol 9 no 7 2017
[30] MHAmini A Kargarian andOKarabasoglu ldquoARIMA-baseddecoupled time series forecasting of electric vehicle chargingdemand for stochastic power system operationrdquo Electric PowerSystems Research vol 140 pp 378ndash390 2016
[31] P SenM Roy andP Pal ldquoApplication ofARIMA for forecastingenergy consumption and GHG emission A case study of anIndian pig iron manufacturing organizationrdquo Energy vol 116pp 1031ndash1038 2016
Hindawiwwwhindawicom Volume 2018
MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Applied MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Probability and StatisticsHindawiwwwhindawicom Volume 2018
Journal of
Hindawiwwwhindawicom Volume 2018
Mathematical PhysicsAdvances in
Complex AnalysisJournal of
Hindawiwwwhindawicom Volume 2018
OptimizationJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
Hindawiwwwhindawicom Volume 2018
Operations ResearchAdvances in
Journal of
Hindawiwwwhindawicom Volume 2018
Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018
International Journal of Mathematics and Mathematical Sciences
Hindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018Volume 2018
Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in
Nature and SocietyHindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Dierential EquationsInternational Journal of
Volume 2018
Hindawiwwwhindawicom Volume 2018
Decision SciencesAdvances in
Hindawiwwwhindawicom Volume 2018
AnalysisInternational Journal of
Hindawiwwwhindawicom Volume 2018
Stochastic AnalysisInternational Journal of
Submit your manuscripts atwwwhindawicom
Mathematical Problems in Engineering 3
y(t) 13 W
b
f W
b
f
Hidden Layer with Delays
1
l = 17 1
y(t)
1
Output Layer
Hj
Figure 1 Example of the NARNN with one input one hidden layer with 17 neurons and one output layer with one output neuron and oneoutput
(1)The time series of ECS follow the basic assumptions ofthe traditional ARIMAmodel
(2) Abnormal data including promotions will be dis-carded or smoothed out
(3) The time series of ECS can become a stationarysequence with a finite difference
(4) Presales of EC are not considered in the ECS-ARIMAforecasting model
(5) The e-commerce company as a research object oper-ates continuously
The ECS-ARIMA forecasting model includes the movingaverage process (MA) the autoregressive process (AR) theautoregressive moving average process (ARMA) and theARIMA process depending on whether the time series ofECS is stable or not and what the regression contains
312 Moving Average MA (q) A qth-order moving averageprocess MA (q) is expressed as follows
119884119905 = 119906 + 120576119905 + 1205791120576119905minus1 + 1205792120576119905minus2 + sdot sdot sdot + 120579119902120576119905minus119902 (1)
where 119884119905 is the current value of ECS u is a constant term120576119905 is the white noise sequence of ECS and 1205791 1205792 120579q arethe moving average coefficient
313 Autoregression AR (p) A pth-order autoregressiveprocess AR (p) is expressed as follows
119884119905 = 119888 + 1206011119884119905minus1 + 1206012119884119905minus2 + sdot sdot sdot + 120601119901119884119905minus119901 + V119905 (2)
where 119884119905minus1 119884119905minus2 119884119905minus119901 are respectively the value thatlag 1st-order 2nd-order and pth-order of the ECS timeseries c is a constant term and V119905 is a white noise process314e Autoregressive Moving Average ARMA (p q) If theMA(q) process ismergedwith theAR (p) process theARMA(p q) process can be obtained which is in the form as follows
119884119905 = 119888 + 1206011119884119905minus1 + 1206012119884119905minus2 + sdot sdot sdot + 120601119901119884119905minus119901 + 1205791120576119905minus1+ 1205792120576119905minus2 + sdot sdot sdot + 120579119902120576119905minus119902 + 120576119905 (3)
where the meaning of each parameter is the same as thosementioned above
315 Autoregressive Integrated Moving Average ARIMA(pd q) A time series can be transformed into a stationary
sequence by one or more differences If a time series of ECS119884119905 is transformed into a stationary sequence 119882119905 with ddifferences 119884119905 is a nonstationary sequence of d order TheARMA (p q) process is established for 119882119905 in this way 119882119905is a ARMA (p q) process and 119884119905 is an ARIMA(p d q)process
316 Seasonal Autoregressive Integrated Moving AverageWhen the time series of e-commerce sales are both trendyand seasonal the series has a correlation that is an integermultiple of the seasonal period It requires that some appro-priate stepwise differencing and seasonal differencing of theseries is usually performed to make the series stationarywhich should adopt the SARIMA(p d q)(PDQ)s modelfor this kind of time series where P Q are the seasonalautoregressive and moving average orders D is the seasonaldifferencing order and s is a seasonal cycle pdq are same asthe ARIMA (pdq) mentioned in Section 311
The (S)ARIMA model is good at linear fitting and fore-casting because it is both linear combination of the historicaldata set residuals and the linear regression of the time serieslag items no matter in the MA AR or ARMA process
32 NARNN for ECS Forecasting
321 Basic eory NARNN is called nonlinear autoregres-sive neural network [26] The NARNN is used in forecastingof ECS to build an ECS-NARNN forecasting model Themodel can continuously learn and train based on past valuesof a given time series of ECS to predict future valueswhich has good memory function The components of theECS-NARNN model include the input neuron(s) the inputlayer(s) the hidden layer(s) the output layer(s) and theoutput neuron(s) The basic framework is as shown inFigure 1
Figure 1 shows an example NARNN y(t) is the inputand output of the neural network that is the time seriesof e-commerce sales 119867119895 is the output of hidden layer 1n represents the delay order (1 3 shown in the figure) inwhich the 1 n can be calculated by formula and obtained byconstantly trying w is the link weight b is the threshold 119897 isthe number of hidden layer neurons and f is the activationfunction of the hidden and output layer
The basic assumptions of the ECS-NARNN forecastingmodel are as follows
4 Mathematical Problems in Engineering
(1)The time series of ECS follow the basic assumptions ofthe traditional NARNNmodel
(2) Other basic assumptions are the same as the assump-tions (2) - (5) in Section 311 of ECS-ARIMA model
It can be described as follows
119910 (119905) = 1198860 + 1198861119910 (119905 minus 1) + 1198862119910 (119905 minus 2) + 1198863119910 (119905 minus 3) + sdot sdot sdot+ 119886119899119910 (119905 minus 119899) + 119890 (119905)) (4)
where 119910(119905) 119910(119905 minus 1) 119910(119905 minus 2) 119910(119905 minus 3) 119910(119905 minus 119899) arerespectively the value lag 0-order 1st-order and nth-order of the ECS sequence and e(t) is white noise It can beseen from the equation that the output at the next momentdepends on the last n moments
Based on the principle of autoregression the followingNARNN are used in the model
119910 (119905) = 119891 (119910 (119905 minus 1) 119910 (119905 minus 2) 119910 (119905 minus 3) 119910 (119905 minus 119899)) (5)
Delay in the ECS-NARNN is the time delay of the outputsignal Because it is a regression based on its own data theECS-NARNN takes the output time delay as the input of thenetwork and calculates the output of the network from thehidden layer and the output layerThe input signal of networkis represented by119910119894The hidden layer calculates the output119867119895of each neuron based on the connection weight 119908119894119895 and thethreshold 119887119894 between the input data and hidden layer neurons
119867119895 = 119891( 119899sum119894=1
119908119894119895y119894 + 119887119895) 119895 = 1 2 119897 (6)
where119867119895 is the output of the jth neuron in hidden layeri is the ith input e-commerce sales data n is the number ofinput e-commerce sales j is the jth hidden layer neuron 119897is the number of hidden layer neurons f is the activationfunction of the hidden layer 119910119894 is the input of the ECS timeseries of the network 119908119894119895 is the connection weight betweenthe ith output delay signal and the jth neuron of the hiddenlayer and 119887119894 is the threshold of the jth hidden neuron
The output layer gets the output 119910(119905) of the networkthrough a linear calculation based on the output 119867119895 of thehidden layer
119910 (119905) = 119891( 119897sum119895=1
119867119895119908119895 + 119887) (7)
where 119910(119905) is the output of the network f is the activationfunction of the output layer 119908119895 is the connection weightbetween the jth neuron in the hidden layer and the neuronin the output layer and 119887 is the threshold of output layerneurons
322 Forecasting of the ECS-NARNN Model NARNN pre-dictions in ECS-NARNN are recursive The main idea of thismethod is to recycle 1st-step forward predictive value Thebasic idea is that as for the NARNN model y(119905119899) = 119891(119910(119905119899 minus1) 119910(119905119899 minus 2) 119910(119905119899 minus 119889)) the first prediction value y(119905119899)canbe obtained when k=1 when it is added to the original
samples (119910(119905119899minus119889) 119910(119905119899minus2) 119910(119905119899minus1)) a new sample y(119905119899+1) can be obtained for the two-step prediction value y(119905119899+1)then we use the nonparametric model to get the new samples(119910(119905119899 minus 119889) 119910(119905119899 minus 2) 119910(119905119899 minus 1) y(119905119899) y(119905119899 + 1)) repeatingthis continuous cycle until k is reached Since the informationcontained in y(119905119899) y(119905119899 + 1) y(119905119899 + 119896 minus 1) is used forthe prediction of the kth step (kgt1) the recursive predictionmethod is better than the direct prediction method
It can be seen that the ECS-NARNN can perform non-linear autoregressive prediction based on time series lagvalues and the NARNN and all-regression neural networkcan transform each other so the ECS-NARNNhas significantperformance in nonlinear mapping and prediction
33 e ARIMA-NARNN Combined Model Based on theabove basic theories of the ARIMA and NARNN models atime series of ECS 119910119905 can be considered as comprising a linearautocorrelation structure 119871 119905 and a nonlinear component 119873119905Therefore 119910119905 can be expressed as119910119905 = 119871 119905 + 119873119905 (8)
The basic assumptions of the ARIMA-NARNNcombinedmodel are as follows
(1) The ECS-ARIMAmodel can fully extracted the linearcomponent of the time series of ECS
(2)The fitting residues of the ECS-ARIMAmodel containa great deal of the nonlinear component in the time series ofECS
(3) Other basic assumptions are the same as the assump-tions (2)-(5) in Section 311 of ECS-ARIMAmodel
The steps of the ARIMA-NARNN combined model topredict are as follows
Step 1 The linear component119871 119905 is predicted bymodeling andforecasting the true time series of ECS119910119905 by using theARIMAmodel
Step 2 The predicted residuals of the ARIMA model areobtained by
119890119905 = 119910119905 minus 119905 (9)
The sequence 119890119905 implies a nonlinear relationship in theoriginal time series
119890119905 = 119891 (119890119905minus1 119890119905minus2 119890119905minus119899) + 1205761015840119905 (10)
where 1205761015840119905 is a random error 119890119905minus1 119890119905minus2 sdot sdot sdot 119890119905minus119899 are respec-tively the value lag 1st-order 2nd-order and nth-order of119890119905 and 119891 is the nonlinear autoregressive function
Step 3 The NARNN model is used to approximate thenonlinear function 119891 and then the sequence 119890119905 is predictedwith the NARNNmodel We set the predicted result as 119905Step 4 Combining the twomodels the final prediction resultof the ARIMA-NARNN combined model is as follows 119910119905 isthe predicted sequence of ECS time series data
119910119905 = 119905 + 119905 (11)
The above process is shown in Figure 2
Mathematical Problems in Engineering 5
ECS-ARIMA
Time series historical data
Residual sequence ECS-NAR
Forecast result
Forecast result
ARIMA-NAR combined model
Figure 2 The ARIMA-NARNN combined model principle
34 Predictive Evaluation Method We use the mean relativeerror (MRE) correlation coefficient R2 and root meansquare error (RMSE) to evaluate the accuracy of fitting andprediction of each model [27]
119872119877119864 = 1119899119899sum119894=1
1003816100381610038161003816119910119894 minus 1199101198941003816100381610038161003816119910119894 times 100 (12)
1198772 = 119899sum119899119894=1 119910119894119910119894 minus sum119899119894=1 119910119894 sum119899119894=1 119910119894radic119899sum119899119894=1 1199102119894 minus (sum119899119894=1 119910119894)2radic119899sum119899119894=1 1199102119894 minus (sum119899119894=1 119910119894)2 (13)
119877119872119878119864 = radic119872119878119864 = radic 1119899119899sum119894=1
(119910119894 minus 119910119894)2 (14)
where 119910119894 is the true value of ECS 119910119894 is the predictive valueof ECS and n is the number of ECS samples
4 Case Study
We selected a total of 60 types of e-commerce items fromthe Jingdong Company in China as an empirical researchobject The types of items include food beverages householdappliances fresh food household goods baby productstoys home textiles clothing footwear etc Each time seriesof e-commerce items we selected is from January 2014 toMarch 2017 a total of 167 weekly sales data sets for onetime series Outliers due to promotions and price changeswill be removed and reinterpolated Then based on thepreprocessed data the ECS-ARIMA ECS-NARNN and theARIMA-NARNN combined models are respectively used topredict the ECS that we selected and finally the predictionerrors of the three models are compared by using (12) and(14)
For this time series a total of 167 weekly sales data setswere used formodeling and forecasting and the top 85 (iea total of 142 sets of weekly sales data from January 06 2014to September 19 2016)were selected as themodel training setThe last 15 (ie a total of 25 sets of weekly sales data fromSeptember 26 2016 to March 13 2017) were used as a test setA two-sided P value of le 005 was regarded as significant
In order to fully demonstrate the process of the casestudy from Sections 41ndash43 a time series (e-commerce salesdata for a single food item) was selected as the object to
0
100
200
300
400
01 04 07 10 01 04 07 10 01 04 072014 2015 2016
Figure 3 Original time series graph of a single food item
be described In Section 44 the results of a comprehensiveanalysis of 60 time series consisting of 60 e-commerceproducts will be presented
41 ARIMA for ECS Forecasting Based on Eviews 80 soft-ware the ARIMA model is used to predict to the ECS Atfirst the ECS model training set is plotted as Figure 3 Thissequence shows dramatic fluctuations with some tendencyand the possible seasonality therefore the (S)ARIMA pro-cess is considered for this time series
The nonstationary sequence shown in Figure 3 is differ-entiated and the stationarity test of differential sequence isperformed using the augmented dickey-fuller (ADF) test
From Table 1 the first-order differential sequence is astationary sequence at a significant level of 005 so d = 1 andD = 0 in the ECS-ARIMA model
From Figure 4 both graphs are trailing And possible(S)ARIMAmodels are identified by Eviews and the best oneis selected as SARIMA (2 1 3)(1 0 1)52 Finally we use Eviewsto predict the total 25weekly sales data of the test sample fromSeptember 26 2016 to March 13 2017 The predicted resultsare in Figure 5
42 NARNN for ECS Forecasting We use neural networktoolbox of Matlab2014b to construct a NARNN structure anduse the trial-and-error method to construct the model with
6 Mathematical Problems in Engineering
Autocorrelation Partial Correlation AC PAC Q-Stat Prob
Figure 4 Autocorrelation and partial autocorrelation functions graph of the first-order differential sequence
Table 1 ADF test of first-order differential sequence
Null Hypothesis D(DLOGDATA) has a unit rootExogenous ConstantLag Length 5 (Automatic - based on SIC maxlag=13)
t-Statistic Problowast
Augmented Dickey-Fuller test statistic -1036760 00000Test critical values 1 level -3479656
5 level -288307310 level -2578331
the number of hidden layer neurons from5 to 40 respectively(debugging shows that when the number of neurons exceeds40 network training time will become longer) The analysisshows that the goods needed to predict for Jingdong is toomuch not suitable for an extended training time that is aftermore than 40 model predictive performance improvementis not enough to make up for the training time loss Sinceinput weights and thresholds directly affect the performanceof the neural network each model is trained 10 timesand the root mean square error (RMSE) and the decisioncoefficient 1198772 of training results are recorded as shown inFigure 6
From Figure 6 as the number of hidden neuronsincreases RMSE decreases firstly and 1198772 increases A changeto the opposite direction begins to occur after reaching20 indicating that as the number increases the tendencyto coordinate results in reduced ability to generalize and
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
Wee
kly
sale
s
Actual valuePrediction from ARIMA
Figure 5 Real values and ARIMAmodel predictive values
finally get the best number of hidden layer neurons of17 Network training and debugging results are shown inFigures 7 and 8
From Figure 7 only the confidence interval of the errorautocorrelation coefficient exceeds 95 when the delay lagorder is 0 The correlation coefficients of the other ordersare within 95 confidence intervals and then the relevanceof information has been fully extracted This illustrates this
Mathematical Problems in Engineering 7
3448
2346
18591978
2459
29062435
2182
0
5
10
15
20
25
30
35
40
5 10 15 20 25 30 35 40
MSE
Hidden layer neurons number
07312
08354
0880909134
08597
0785208109
08447
06
065
07
075
08
085
09
095
5 10 15 20 25 30 35 40Hidden layer neurons number
R^2
Figure 6 MSE and 1198772 under different hidden neurons
Lag
minus500
0
500
1000
1500
2000
2500
Cor
rela
tion
Autocorrelation of Error 1
CorrelationsZero CorrelationConfidence Limit
minus20 minus15 minus10 minus5 0 5 10 15 20
Figure 7 The network residual autocorrelation map when thenumber of hidden neurons is 17
model is for purpose and then get the error graph shown inFigure 8
The final result is shown in Figure 9
43 ARIMA-NARNN for ECS Forecasting ARIMA-NARNNcombination prediction ismainly completed by the following
(1) Calculating the residual sequence 119890119905 = 119910119905 minus 119871 119905(2) Using the NARNN prediction to obtain the predicted
sequence value 119873119905 of the nonlinear prediction part based onthe obtained residual sequence 119890119905
(3) Calculating the sales forecast result 119910119905 = 119871 119905 + 119873119905 ofthe ARIMA-NARNN model based on the prediction resultsof ARIMA model in 41 and the nonlinear part residualprediction values obtained in (2)
From Figure 10 only the autocorrelation coefficient ofthe error whose delay lag order is 0 exceeds 95 confidenceintervals The autocorrelation coefficients of the other ordersare within 95 confidence intervals and fluctuate around the0 value indicating that the model is reasonable and credibleAt the same time its model error is shown in Figure 11
minus100
0
100
200
300
400
500
Out
put a
nd T
arge
t
Response of Output Element 1 for Time-Series 1
20 40 60 80 100 120 140 160Time
20 40 60 80 100 120 140 160Time
minus500
0
500
Erro
r
Training TargetsTraining OutputsValidation TargetsValidation Outputs
Test TargetsTest OutputsErrorsResponse
Targets - Outputs
Figure 8 The error graph of the NARNN fitting model
The errors of NARNN are shown in Figure 11 The errorsof training set verification set and test set vary little withtime and the residuals in the previous period are close tozero In the later period although the residuals have becomebigger than before the overall error is within the acceptablerange and fluctuates around the zero value indicating that theestablished neural network model is credible and can be usedfor prediction of future residuals So based on this networkthe forecast result is shown in Figure 12
This article uses weekly sales data from January 062014 to September 19 2016 as the experimental set datafrom September 26 2016 to January 13 2017 as a test setusing the MRE and RMSE to compare the fitting error
8 Mathematical Problems in Engineering
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from NARNN
Figure 9 Actual values and predicted values from ECS-NARNN
Lag
minus400minus200
0200400600800
1000120014001600
Cor
rela
tion
Autocorrelation of Error 1
CorrelationsZero CorrelationConfidence Limit
minus20 minus15 minus10 minus5 0 5 10 15 20
Figure 10 Error correlation diagram of using NARNN to fit theresidual of ARIMA
and prediction error of ECS-ARIMA ECS-NARNN andARIMA-NARNN combined model and then evaluate thepredictive performance of each model
The predicted and actual values of the three models arecompared as shown in Figure 13
From Figure 13 the predicted value of the three modelsin the test set fits well with the real value and the predictionperformance is also good The ARIMA-NARNN model hasa higher fitting degree for predicted values and real valuesHowever the result is only for a single time series in orderto verify the universal superiority of the ARIMA-NARNNmodel the same analysis process will be performed for theother 59 time series of different e-commerce items sales Thetypes of items include food beverages household appliancesfresh food household goods baby products toys hometextiles clothing footwear etc
minus200minus150minus100minus50
050
100150200250
Out
put a
nd T
arge
t
Response of Output Element 1 for Time-Series 1
Training TargetsTraining OutputsValidation TargetsValidation Outputs
Test TargetsTest OutputsErrorsResponse
20 40 60 80 100 120 140 160Time
20 40 60 80 100 120 140 160Time
minus2000
200400
Erro
rTargets - Outputs
Figure 11 Error of using NARNN to fit the residual of ARIMA
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from ARIMA-NARNN
Figure 12 The prediction of using ARIMA-NARNN combinedmodel and actual values
44 Model Comparison and Discussion In the 60 time seriesof different e-commerce products the trend and season-ality of them are not exactly the same For different timeseries features different analysis methods (ie ARIMA orSARIMA) will be usedThe final analysis results are shown inFigure 14
It can be seen in Figure 14 that the RMSE of ARIMA-NARNN is generally lower than that of ARIMAandNARNNIn order to quantitatively compare the effects of the threemodels average of the MRE and RMSE for 60 e-commerce
Mathematical Problems in Engineering 9
Table 2 Average of the MRE and RMSE for 60 e-commerce products of fitting and prediction
Model Fitting error Prediction errorMRE RMSE MRE RMSE
ARIMA 00998 283451 01389 318082NARNN 00879 191893 01016 255668ARIMA-NARNN 00703 129549 009012 232321
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from ARIMAPrediction from NARNNPrediction from ARIMA-NARNN
Figure 13 Actual values and the predicted values from the threemodels
products of fitting and prediction was calculated by using (12)and (14) Table 2 shows the calculation results
The fitting and forecasting performance of the threemodels for Jingdongrsquos weekly sales data is shown in Table 2It can be seen that both the MRE and RMSE of the ARIMA-NARNN combined model are the lowest in model fitting andmodel prediction Therefore the ARIMA-NARNN combina-tion model is the best the ECS-NARNN is the second andthe ECS-ARIMA model is the worst
5 Conclusion
The ECS studied in this paper often has two characteristicslinearity and nonlinearity We choose the e-commerce salestime series of many single products from Jingdong Companyin China as empirical analysis data sets and forecast thetime series of weekly sales by ECS-ARIMA model Wefind that the model has good adaptability to the linearpatterns of e-commerce sales and low fitness to nonlinearpatterns which has a big local error When ECS-NARNNmodel is used to predict it is found that the model canwell realize the nonlinear mapping process However itis easy to cause underfitting and overfitting because ofpoor control of the model structure and the prediction oflinear components is not as effective as the ECS-ARIMAmodel
0 10 20 30 40 6050E-commerce product id
15
20
25
30
35
40
RMSE
ARIMANARNNARIMA-NARNN
Figure 14 RMSE of 60 time series of e-commerce products fromthe ARIMA NARNN and ARIMA-NARNNmodels
We set up the ARIMA-NARNN combined model Specif-ically we use the ECS-ARIMA model to predict linearcomponents of the time series and use the predictedresidual of the ARIMA as a nonlinear component Atlast we predict the nonlinear component by using theECS-NARNN Our case study shows that the ARIMA-NARNN outperforms the ECS-ARIMA and ECS-NARNNmodels in terms of the prediction accuracy which is welladapted to the forecasting of ECS with linear and nonlinearcharacteristics
In the actual application of EC companies the idea ofthis research can be used to forecast the sales of differenttypes of e-commerce products Depending on the salesfrequency of different types of products different forecastingdurations can be selected to use this more effective ARIMA-NARNN combined model to predict sales in a future periodof time Therefore according to this precise forecast theenterprisersquos inventory strategy and logistics strategy can bemore rationally formulated so that the entire supply chain canoperate more smoothly
Appendix
A Matlab Code
See Box 1
10 Mathematical Problems in Engineering
solved by NARNN based on matlab rawdata is a weekly sales data of chocolate of the JDCOMrawdata=dataT = tonndata(rawdatafalsefalse) lsquotrainlmrsquo is usually fastest lsquotrainbrrsquo takes longer but may be better for challenging problems lsquotrainscgrsquo uses less memory NTSTOOL falls back to this in low memory situationstrainFcn = lsquotrainbrrsquo Bayesian RegularizationfeedbackDelays = 13hiddenLayerSize = 17net = narnet(feedbackDelayshiddenLayerSize lsquoopenrsquotrainFcn)netinputprocessFcns = lsquoremoveconstantrowsrsquo lsquomapminmaxrsquo[xxiait] = preparets(netT)netdivideFcn = lsquodividerandrsquo Divide data randomlynetdivideMode = lsquotimersquo Divide up every valuenetdivideParamtrainRatio = 70100netdivideParamvalRatio = 15100netdivideParamtestRatio = 15100netperformFcn = lsquomsersquonetplotFcns = lsquoplotperformrsquo lsquoplottrainstatersquo lsquoplotresponsersquo
lsquoploterrcorrrsquo lsquoplotinerrcorrrsquo[nettr] = train(netxtxiai)y = net(xxiai)e = gsubtract(ty)performance = perform(netty)trainTargets = gmultiply(ttrtrainMask)valTargets = gmultiply(ttrvalMask)testTargets = gmultiply(ttrtestMask)trainPerformance = perform(nettrainTargetsy)valPerformance = perform(netvalTargetsy)testPerformance = perform(nettestTargetsy)view(net) Plots Uncomment these lines to enable various plotsfigure plotperform(tr)figure plottrainstate(tr)figure plotresponse(ty)figure ploterrcorr(e)figure plotinerrcorr(xe)netc = closeloop(net)[xcxicaictc] = preparets(netcT)yc = netc(xcxicaic)perfc = perform(nettcyc)[x1xioaiot] = preparets(netT)[y1xfoafo] = net(x1xioaio)[netcxicaic] = closeloop(netxfoafo)[y2xfcafc] = netc(cell(05)xicaic)nets = removedelay(net)[xsxisaists] = preparets(netsT)ys = nets(xsxisais)stepAheadPerformance = perform(nettsys)genFunction(net lsquomyNeuralNetworkFunctionrsquo)
y = myNeuralNetworkFunction(xxiai)endif (false)
genFunction(net lsquomyNeuralNetworkFunctionrsquo lsquoMatrixOnlyrsquo lsquoyesrsquo)x1 = cell2mat(x(1))xi1 = cell2mat(xi(1))y = myNeuralNetworkFunction(x1xi1)
endif (false)
gensim(net)end
Box 1
Mathematical Problems in Engineering 11
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request Seethe Appendix
Conflicts of Interest
The authors declare that they have no conflicts of interest
Acknowledgments
The study is funded by Scientific and Technological SupportProgram of the Ministry of Science and Technology ofPeoplersquos Republic of China (2014BAH23F01)
References
[1] L R Dhumne ldquoElectronic commerce a current trendrdquo Interna-tional Journal on Information Technology Management 2012
[2] X Q Zhang and S W Chen ldquoForecast of Chinas ForestationArea Based on ARIMA Modelrdquo Chinese Forestry Science ampTechnology vol 5 no 2 pp 50ndash55 2010
[3] K W Wang C Deng and J P Li ldquoHybrid methodology fortuberculosis incidence time-series forecasting based onARIMAand a NAR neural networkrdquo Epidemiology amp Infection vol 12017
[4] S Wei D Zuo and J Song ldquoImproving prediction accuracy ofriver discharge time series using aWavelet-NARartificial neuralnetworkrdquo Journal of Hydroinformatics vol 14 no 4 pp 974ndash991 2012
[5] L Yu L Zhou L Tan et al ldquoApplication of a new hybridmodel with seasonal auto-regressive integrated moving aver-age (ARIMA) and nonlinear auto-regressive neural network(NARNN) in forecasting incidence cases of HFMD in Shen-zhen Chinardquo PLoS ONE vol 9 no 6 2014
[6] T Van Calster B Baesens and W Lemahieu ldquoProfARIMA Aprofit-driven order identification algorithm for ARIMAmodelsin sales forecastingrdquo Applied So Computing vol 60 pp 775ndash785 2017
[7] P Ramos N Santos and R Rebelo ldquoPerformance of statespace andARIMAmodels for consumer retail sales forecastingrdquoRobotics and Computer-Integrated Manufacturing vol 34 pp151ndash163 2015
[8] D Wei P Geng L Ying and S Li ldquoA prediction study on e-commerce sales based on structure time series model and websearch datardquo in Proceedings of the 26th Chinese Control andDecision Conference CCDC 2014 pp 5346ndash5351 China June2014
[9] P Geng L Na and L Ben-Fu ldquoResearch on the Predictionof E-commerce Transaction Volume - Based on the PredictionModel of Search Data and Commodity Classification in Sta-tionrdquoManagement Modernization vol 2 pp 30ndash32 2014
[10] J Yu and X Le ldquoSales forecast for amazon sales based ondifferent statistics methodologiesrdquo ICEME vol 12 2016
[11] Y Miao Research on Mid - Season Sales Forecast Based onMachine Learning eory Zhejiang University of Technology2015
[12] L Ye and D D Fu ldquoExperience of He Ruoping using medicinein treating bladder tumorrdquo Journal of Zhejiang Chinese MedicineUniversity vol 39 no 1 pp 28ndash34 2015
[13] P Doganis A Alexandridis P Patrinos and H SarimveisldquoTime series sales forecasting for short shelf-life food productsbased on artificial neural networks and evolutionary comput-ingrdquo Journal of Food Engineering vol 75 no 2 pp 196ndash2042006
[14] P H Franses and R Legerstee ldquoCombining SKU-level salesforecasts from models and expertsrdquo Expert Systems with Appli-cations vol 38 no 3 pp 2365ndash2370 2011
[15] Y Weng and H Feng ldquoResearch online store sale forcast modelbased on BP neural networkrdquo Journal of Minjiang University2016
[16] P Qin and C Cheng ldquoPrediction of Seawall Settlement Basedon a Combined LS-ARIMA ModelrdquoMathematical Problems inEngineering vol 2017 Article ID 7840569 7 pages 2017
[17] Y E Shao ldquoPrediction of Currency Volume Issued in TaiwanUsing a Hybrid Artificial Neural Network andMultiple Regres-sion Approachrdquo Mathematical Problems in Engineering vol2013 Article ID 676742 9 pages 2013
[18] J Huang Y Tang and S Chen ldquoEnergy Demand ForecastingCombining Cointegration Analysis and Artificial IntelligenceAlgorithmrdquo Mathematical Problems in Engineering vol 2018Article ID 5194810 13 pages 2018
[19] J M P Menezes Jr and G A Barreto ldquoLong-term time seriesprediction with the NARX network An empirical evaluationrdquoNeurocomputing vol 71 no 16-18 pp 3335ndash3343 2008
[20] K Prabakaran C Sivapragasam C Jeevapriya and A Nar-matha ldquoForecasting Cultivated Areas And Production OfWheat In India Using ARIMA Modelrdquo Golden Researchoughts vol 3 no 3 pp 281ndash289 2013
[21] O Kaynar and S Tastan ldquoZaman serileri tahmininde arima-mlp melez modelirdquo Ataturk University Journal of EconomicsAdministrative Science 2010
[22] M Qin and Z Du Red tide time series forecasting by combiningARIMA and deep belief network Elsevier Science Publishers2017
[23] S Barak and S S Sadegh ldquoForecasting energy consumptionusing ensemble ARIMA-ANFIS hybrid algorithmrdquo Interna-tional Journal of Electrical Power amp Energy Systems vol 82 pp92ndash104 2016
[24] R Bonetto and M Rossi ldquoParallel multi-step ahead powerdemand forecasting throughNARneural networksrdquo in Proceed-ings of the 7th IEEE International Conference on Smart GridCommunications SmartGridComm 2016 pp 314ndash319 AustraliaNovember 2016
[25] M Sharafi H Ghaem H R Tabatabaee and H FaramarzildquoForecasting the number of zoonotic cutaneous leishmaniasiscases in south of Fars province Iran using seasonal ARIMAtime series methodrdquo Asian Pacific Journal of Tropical Medicinevol 10 no 1 pp 79ndash86 2017
[26] E Cadenas W Rivera R Campos-Amezcua and C HeardldquoWind speed prediction using a univariate ARIMAmodel and amultivariate NARXmodelrdquo Energies vol 9 no 2 pp 1ndash15 2016
[27] R Gamberini F Lolli B Rimini and F Sgarbossa ldquoForecastingof sporadic demand patterns with seasonality and trend com-ponents An empirical comparison between holt-winters and(s)ARIMA methodsrdquo Mathematical Problems in Engineeringvol 2010 Article ID 579010 15 pages 2010
[28] M A Rahman and L Casanovas ldquoStrategies to Predict E-Commerce Inventory and Order Planningrdquo International Jour-nal of Technology Diffusion vol 8 no 4 pp 17ndash30 2017
12 Mathematical Problems in Engineering
[29] S Li andR Li ldquoComparison of forecasting energy consumptionin Shandong China Using the ARIMA model GMmodel andARIMA-GMmodelrdquo Sustainability vol 9 no 7 2017
[30] MHAmini A Kargarian andOKarabasoglu ldquoARIMA-baseddecoupled time series forecasting of electric vehicle chargingdemand for stochastic power system operationrdquo Electric PowerSystems Research vol 140 pp 378ndash390 2016
[31] P SenM Roy andP Pal ldquoApplication ofARIMA for forecastingenergy consumption and GHG emission A case study of anIndian pig iron manufacturing organizationrdquo Energy vol 116pp 1031ndash1038 2016
Hindawiwwwhindawicom Volume 2018
MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Applied MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Probability and StatisticsHindawiwwwhindawicom Volume 2018
Journal of
Hindawiwwwhindawicom Volume 2018
Mathematical PhysicsAdvances in
Complex AnalysisJournal of
Hindawiwwwhindawicom Volume 2018
OptimizationJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
Hindawiwwwhindawicom Volume 2018
Operations ResearchAdvances in
Journal of
Hindawiwwwhindawicom Volume 2018
Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018
International Journal of Mathematics and Mathematical Sciences
Hindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018Volume 2018
Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in
Nature and SocietyHindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Dierential EquationsInternational Journal of
Volume 2018
Hindawiwwwhindawicom Volume 2018
Decision SciencesAdvances in
Hindawiwwwhindawicom Volume 2018
AnalysisInternational Journal of
Hindawiwwwhindawicom Volume 2018
Stochastic AnalysisInternational Journal of
Submit your manuscripts atwwwhindawicom
4 Mathematical Problems in Engineering
(1)The time series of ECS follow the basic assumptions ofthe traditional NARNNmodel
(2) Other basic assumptions are the same as the assump-tions (2) - (5) in Section 311 of ECS-ARIMA model
It can be described as follows
119910 (119905) = 1198860 + 1198861119910 (119905 minus 1) + 1198862119910 (119905 minus 2) + 1198863119910 (119905 minus 3) + sdot sdot sdot+ 119886119899119910 (119905 minus 119899) + 119890 (119905)) (4)
where 119910(119905) 119910(119905 minus 1) 119910(119905 minus 2) 119910(119905 minus 3) 119910(119905 minus 119899) arerespectively the value lag 0-order 1st-order and nth-order of the ECS sequence and e(t) is white noise It can beseen from the equation that the output at the next momentdepends on the last n moments
Based on the principle of autoregression the followingNARNN are used in the model
119910 (119905) = 119891 (119910 (119905 minus 1) 119910 (119905 minus 2) 119910 (119905 minus 3) 119910 (119905 minus 119899)) (5)
Delay in the ECS-NARNN is the time delay of the outputsignal Because it is a regression based on its own data theECS-NARNN takes the output time delay as the input of thenetwork and calculates the output of the network from thehidden layer and the output layerThe input signal of networkis represented by119910119894The hidden layer calculates the output119867119895of each neuron based on the connection weight 119908119894119895 and thethreshold 119887119894 between the input data and hidden layer neurons
119867119895 = 119891( 119899sum119894=1
119908119894119895y119894 + 119887119895) 119895 = 1 2 119897 (6)
where119867119895 is the output of the jth neuron in hidden layeri is the ith input e-commerce sales data n is the number ofinput e-commerce sales j is the jth hidden layer neuron 119897is the number of hidden layer neurons f is the activationfunction of the hidden layer 119910119894 is the input of the ECS timeseries of the network 119908119894119895 is the connection weight betweenthe ith output delay signal and the jth neuron of the hiddenlayer and 119887119894 is the threshold of the jth hidden neuron
The output layer gets the output 119910(119905) of the networkthrough a linear calculation based on the output 119867119895 of thehidden layer
119910 (119905) = 119891( 119897sum119895=1
119867119895119908119895 + 119887) (7)
where 119910(119905) is the output of the network f is the activationfunction of the output layer 119908119895 is the connection weightbetween the jth neuron in the hidden layer and the neuronin the output layer and 119887 is the threshold of output layerneurons
322 Forecasting of the ECS-NARNN Model NARNN pre-dictions in ECS-NARNN are recursive The main idea of thismethod is to recycle 1st-step forward predictive value Thebasic idea is that as for the NARNN model y(119905119899) = 119891(119910(119905119899 minus1) 119910(119905119899 minus 2) 119910(119905119899 minus 119889)) the first prediction value y(119905119899)canbe obtained when k=1 when it is added to the original
samples (119910(119905119899minus119889) 119910(119905119899minus2) 119910(119905119899minus1)) a new sample y(119905119899+1) can be obtained for the two-step prediction value y(119905119899+1)then we use the nonparametric model to get the new samples(119910(119905119899 minus 119889) 119910(119905119899 minus 2) 119910(119905119899 minus 1) y(119905119899) y(119905119899 + 1)) repeatingthis continuous cycle until k is reached Since the informationcontained in y(119905119899) y(119905119899 + 1) y(119905119899 + 119896 minus 1) is used forthe prediction of the kth step (kgt1) the recursive predictionmethod is better than the direct prediction method
It can be seen that the ECS-NARNN can perform non-linear autoregressive prediction based on time series lagvalues and the NARNN and all-regression neural networkcan transform each other so the ECS-NARNNhas significantperformance in nonlinear mapping and prediction
33 e ARIMA-NARNN Combined Model Based on theabove basic theories of the ARIMA and NARNN models atime series of ECS 119910119905 can be considered as comprising a linearautocorrelation structure 119871 119905 and a nonlinear component 119873119905Therefore 119910119905 can be expressed as119910119905 = 119871 119905 + 119873119905 (8)
The basic assumptions of the ARIMA-NARNNcombinedmodel are as follows
(1) The ECS-ARIMAmodel can fully extracted the linearcomponent of the time series of ECS
(2)The fitting residues of the ECS-ARIMAmodel containa great deal of the nonlinear component in the time series ofECS
(3) Other basic assumptions are the same as the assump-tions (2)-(5) in Section 311 of ECS-ARIMAmodel
The steps of the ARIMA-NARNN combined model topredict are as follows
Step 1 The linear component119871 119905 is predicted bymodeling andforecasting the true time series of ECS119910119905 by using theARIMAmodel
Step 2 The predicted residuals of the ARIMA model areobtained by
119890119905 = 119910119905 minus 119905 (9)
The sequence 119890119905 implies a nonlinear relationship in theoriginal time series
119890119905 = 119891 (119890119905minus1 119890119905minus2 119890119905minus119899) + 1205761015840119905 (10)
where 1205761015840119905 is a random error 119890119905minus1 119890119905minus2 sdot sdot sdot 119890119905minus119899 are respec-tively the value lag 1st-order 2nd-order and nth-order of119890119905 and 119891 is the nonlinear autoregressive function
Step 3 The NARNN model is used to approximate thenonlinear function 119891 and then the sequence 119890119905 is predictedwith the NARNNmodel We set the predicted result as 119905Step 4 Combining the twomodels the final prediction resultof the ARIMA-NARNN combined model is as follows 119910119905 isthe predicted sequence of ECS time series data
119910119905 = 119905 + 119905 (11)
The above process is shown in Figure 2
Mathematical Problems in Engineering 5
ECS-ARIMA
Time series historical data
Residual sequence ECS-NAR
Forecast result
Forecast result
ARIMA-NAR combined model
Figure 2 The ARIMA-NARNN combined model principle
34 Predictive Evaluation Method We use the mean relativeerror (MRE) correlation coefficient R2 and root meansquare error (RMSE) to evaluate the accuracy of fitting andprediction of each model [27]
119872119877119864 = 1119899119899sum119894=1
1003816100381610038161003816119910119894 minus 1199101198941003816100381610038161003816119910119894 times 100 (12)
1198772 = 119899sum119899119894=1 119910119894119910119894 minus sum119899119894=1 119910119894 sum119899119894=1 119910119894radic119899sum119899119894=1 1199102119894 minus (sum119899119894=1 119910119894)2radic119899sum119899119894=1 1199102119894 minus (sum119899119894=1 119910119894)2 (13)
119877119872119878119864 = radic119872119878119864 = radic 1119899119899sum119894=1
(119910119894 minus 119910119894)2 (14)
where 119910119894 is the true value of ECS 119910119894 is the predictive valueof ECS and n is the number of ECS samples
4 Case Study
We selected a total of 60 types of e-commerce items fromthe Jingdong Company in China as an empirical researchobject The types of items include food beverages householdappliances fresh food household goods baby productstoys home textiles clothing footwear etc Each time seriesof e-commerce items we selected is from January 2014 toMarch 2017 a total of 167 weekly sales data sets for onetime series Outliers due to promotions and price changeswill be removed and reinterpolated Then based on thepreprocessed data the ECS-ARIMA ECS-NARNN and theARIMA-NARNN combined models are respectively used topredict the ECS that we selected and finally the predictionerrors of the three models are compared by using (12) and(14)
For this time series a total of 167 weekly sales data setswere used formodeling and forecasting and the top 85 (iea total of 142 sets of weekly sales data from January 06 2014to September 19 2016)were selected as themodel training setThe last 15 (ie a total of 25 sets of weekly sales data fromSeptember 26 2016 to March 13 2017) were used as a test setA two-sided P value of le 005 was regarded as significant
In order to fully demonstrate the process of the casestudy from Sections 41ndash43 a time series (e-commerce salesdata for a single food item) was selected as the object to
0
100
200
300
400
01 04 07 10 01 04 07 10 01 04 072014 2015 2016
Figure 3 Original time series graph of a single food item
be described In Section 44 the results of a comprehensiveanalysis of 60 time series consisting of 60 e-commerceproducts will be presented
41 ARIMA for ECS Forecasting Based on Eviews 80 soft-ware the ARIMA model is used to predict to the ECS Atfirst the ECS model training set is plotted as Figure 3 Thissequence shows dramatic fluctuations with some tendencyand the possible seasonality therefore the (S)ARIMA pro-cess is considered for this time series
The nonstationary sequence shown in Figure 3 is differ-entiated and the stationarity test of differential sequence isperformed using the augmented dickey-fuller (ADF) test
From Table 1 the first-order differential sequence is astationary sequence at a significant level of 005 so d = 1 andD = 0 in the ECS-ARIMA model
From Figure 4 both graphs are trailing And possible(S)ARIMAmodels are identified by Eviews and the best oneis selected as SARIMA (2 1 3)(1 0 1)52 Finally we use Eviewsto predict the total 25weekly sales data of the test sample fromSeptember 26 2016 to March 13 2017 The predicted resultsare in Figure 5
42 NARNN for ECS Forecasting We use neural networktoolbox of Matlab2014b to construct a NARNN structure anduse the trial-and-error method to construct the model with
6 Mathematical Problems in Engineering
Autocorrelation Partial Correlation AC PAC Q-Stat Prob
Figure 4 Autocorrelation and partial autocorrelation functions graph of the first-order differential sequence
Table 1 ADF test of first-order differential sequence
Null Hypothesis D(DLOGDATA) has a unit rootExogenous ConstantLag Length 5 (Automatic - based on SIC maxlag=13)
t-Statistic Problowast
Augmented Dickey-Fuller test statistic -1036760 00000Test critical values 1 level -3479656
5 level -288307310 level -2578331
the number of hidden layer neurons from5 to 40 respectively(debugging shows that when the number of neurons exceeds40 network training time will become longer) The analysisshows that the goods needed to predict for Jingdong is toomuch not suitable for an extended training time that is aftermore than 40 model predictive performance improvementis not enough to make up for the training time loss Sinceinput weights and thresholds directly affect the performanceof the neural network each model is trained 10 timesand the root mean square error (RMSE) and the decisioncoefficient 1198772 of training results are recorded as shown inFigure 6
From Figure 6 as the number of hidden neuronsincreases RMSE decreases firstly and 1198772 increases A changeto the opposite direction begins to occur after reaching20 indicating that as the number increases the tendencyto coordinate results in reduced ability to generalize and
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
Wee
kly
sale
s
Actual valuePrediction from ARIMA
Figure 5 Real values and ARIMAmodel predictive values
finally get the best number of hidden layer neurons of17 Network training and debugging results are shown inFigures 7 and 8
From Figure 7 only the confidence interval of the errorautocorrelation coefficient exceeds 95 when the delay lagorder is 0 The correlation coefficients of the other ordersare within 95 confidence intervals and then the relevanceof information has been fully extracted This illustrates this
Mathematical Problems in Engineering 7
3448
2346
18591978
2459
29062435
2182
0
5
10
15
20
25
30
35
40
5 10 15 20 25 30 35 40
MSE
Hidden layer neurons number
07312
08354
0880909134
08597
0785208109
08447
06
065
07
075
08
085
09
095
5 10 15 20 25 30 35 40Hidden layer neurons number
R^2
Figure 6 MSE and 1198772 under different hidden neurons
Lag
minus500
0
500
1000
1500
2000
2500
Cor
rela
tion
Autocorrelation of Error 1
CorrelationsZero CorrelationConfidence Limit
minus20 minus15 minus10 minus5 0 5 10 15 20
Figure 7 The network residual autocorrelation map when thenumber of hidden neurons is 17
model is for purpose and then get the error graph shown inFigure 8
The final result is shown in Figure 9
43 ARIMA-NARNN for ECS Forecasting ARIMA-NARNNcombination prediction ismainly completed by the following
(1) Calculating the residual sequence 119890119905 = 119910119905 minus 119871 119905(2) Using the NARNN prediction to obtain the predicted
sequence value 119873119905 of the nonlinear prediction part based onthe obtained residual sequence 119890119905
(3) Calculating the sales forecast result 119910119905 = 119871 119905 + 119873119905 ofthe ARIMA-NARNN model based on the prediction resultsof ARIMA model in 41 and the nonlinear part residualprediction values obtained in (2)
From Figure 10 only the autocorrelation coefficient ofthe error whose delay lag order is 0 exceeds 95 confidenceintervals The autocorrelation coefficients of the other ordersare within 95 confidence intervals and fluctuate around the0 value indicating that the model is reasonable and credibleAt the same time its model error is shown in Figure 11
minus100
0
100
200
300
400
500
Out
put a
nd T
arge
t
Response of Output Element 1 for Time-Series 1
20 40 60 80 100 120 140 160Time
20 40 60 80 100 120 140 160Time
minus500
0
500
Erro
r
Training TargetsTraining OutputsValidation TargetsValidation Outputs
Test TargetsTest OutputsErrorsResponse
Targets - Outputs
Figure 8 The error graph of the NARNN fitting model
The errors of NARNN are shown in Figure 11 The errorsof training set verification set and test set vary little withtime and the residuals in the previous period are close tozero In the later period although the residuals have becomebigger than before the overall error is within the acceptablerange and fluctuates around the zero value indicating that theestablished neural network model is credible and can be usedfor prediction of future residuals So based on this networkthe forecast result is shown in Figure 12
This article uses weekly sales data from January 062014 to September 19 2016 as the experimental set datafrom September 26 2016 to January 13 2017 as a test setusing the MRE and RMSE to compare the fitting error
8 Mathematical Problems in Engineering
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from NARNN
Figure 9 Actual values and predicted values from ECS-NARNN
Lag
minus400minus200
0200400600800
1000120014001600
Cor
rela
tion
Autocorrelation of Error 1
CorrelationsZero CorrelationConfidence Limit
minus20 minus15 minus10 minus5 0 5 10 15 20
Figure 10 Error correlation diagram of using NARNN to fit theresidual of ARIMA
and prediction error of ECS-ARIMA ECS-NARNN andARIMA-NARNN combined model and then evaluate thepredictive performance of each model
The predicted and actual values of the three models arecompared as shown in Figure 13
From Figure 13 the predicted value of the three modelsin the test set fits well with the real value and the predictionperformance is also good The ARIMA-NARNN model hasa higher fitting degree for predicted values and real valuesHowever the result is only for a single time series in orderto verify the universal superiority of the ARIMA-NARNNmodel the same analysis process will be performed for theother 59 time series of different e-commerce items sales Thetypes of items include food beverages household appliancesfresh food household goods baby products toys hometextiles clothing footwear etc
minus200minus150minus100minus50
050
100150200250
Out
put a
nd T
arge
t
Response of Output Element 1 for Time-Series 1
Training TargetsTraining OutputsValidation TargetsValidation Outputs
Test TargetsTest OutputsErrorsResponse
20 40 60 80 100 120 140 160Time
20 40 60 80 100 120 140 160Time
minus2000
200400
Erro
rTargets - Outputs
Figure 11 Error of using NARNN to fit the residual of ARIMA
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from ARIMA-NARNN
Figure 12 The prediction of using ARIMA-NARNN combinedmodel and actual values
44 Model Comparison and Discussion In the 60 time seriesof different e-commerce products the trend and season-ality of them are not exactly the same For different timeseries features different analysis methods (ie ARIMA orSARIMA) will be usedThe final analysis results are shown inFigure 14
It can be seen in Figure 14 that the RMSE of ARIMA-NARNN is generally lower than that of ARIMAandNARNNIn order to quantitatively compare the effects of the threemodels average of the MRE and RMSE for 60 e-commerce
Mathematical Problems in Engineering 9
Table 2 Average of the MRE and RMSE for 60 e-commerce products of fitting and prediction
Model Fitting error Prediction errorMRE RMSE MRE RMSE
ARIMA 00998 283451 01389 318082NARNN 00879 191893 01016 255668ARIMA-NARNN 00703 129549 009012 232321
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from ARIMAPrediction from NARNNPrediction from ARIMA-NARNN
Figure 13 Actual values and the predicted values from the threemodels
products of fitting and prediction was calculated by using (12)and (14) Table 2 shows the calculation results
The fitting and forecasting performance of the threemodels for Jingdongrsquos weekly sales data is shown in Table 2It can be seen that both the MRE and RMSE of the ARIMA-NARNN combined model are the lowest in model fitting andmodel prediction Therefore the ARIMA-NARNN combina-tion model is the best the ECS-NARNN is the second andthe ECS-ARIMA model is the worst
5 Conclusion
The ECS studied in this paper often has two characteristicslinearity and nonlinearity We choose the e-commerce salestime series of many single products from Jingdong Companyin China as empirical analysis data sets and forecast thetime series of weekly sales by ECS-ARIMA model Wefind that the model has good adaptability to the linearpatterns of e-commerce sales and low fitness to nonlinearpatterns which has a big local error When ECS-NARNNmodel is used to predict it is found that the model canwell realize the nonlinear mapping process However itis easy to cause underfitting and overfitting because ofpoor control of the model structure and the prediction oflinear components is not as effective as the ECS-ARIMAmodel
0 10 20 30 40 6050E-commerce product id
15
20
25
30
35
40
RMSE
ARIMANARNNARIMA-NARNN
Figure 14 RMSE of 60 time series of e-commerce products fromthe ARIMA NARNN and ARIMA-NARNNmodels
We set up the ARIMA-NARNN combined model Specif-ically we use the ECS-ARIMA model to predict linearcomponents of the time series and use the predictedresidual of the ARIMA as a nonlinear component Atlast we predict the nonlinear component by using theECS-NARNN Our case study shows that the ARIMA-NARNN outperforms the ECS-ARIMA and ECS-NARNNmodels in terms of the prediction accuracy which is welladapted to the forecasting of ECS with linear and nonlinearcharacteristics
In the actual application of EC companies the idea ofthis research can be used to forecast the sales of differenttypes of e-commerce products Depending on the salesfrequency of different types of products different forecastingdurations can be selected to use this more effective ARIMA-NARNN combined model to predict sales in a future periodof time Therefore according to this precise forecast theenterprisersquos inventory strategy and logistics strategy can bemore rationally formulated so that the entire supply chain canoperate more smoothly
Appendix
A Matlab Code
See Box 1
10 Mathematical Problems in Engineering
solved by NARNN based on matlab rawdata is a weekly sales data of chocolate of the JDCOMrawdata=dataT = tonndata(rawdatafalsefalse) lsquotrainlmrsquo is usually fastest lsquotrainbrrsquo takes longer but may be better for challenging problems lsquotrainscgrsquo uses less memory NTSTOOL falls back to this in low memory situationstrainFcn = lsquotrainbrrsquo Bayesian RegularizationfeedbackDelays = 13hiddenLayerSize = 17net = narnet(feedbackDelayshiddenLayerSize lsquoopenrsquotrainFcn)netinputprocessFcns = lsquoremoveconstantrowsrsquo lsquomapminmaxrsquo[xxiait] = preparets(netT)netdivideFcn = lsquodividerandrsquo Divide data randomlynetdivideMode = lsquotimersquo Divide up every valuenetdivideParamtrainRatio = 70100netdivideParamvalRatio = 15100netdivideParamtestRatio = 15100netperformFcn = lsquomsersquonetplotFcns = lsquoplotperformrsquo lsquoplottrainstatersquo lsquoplotresponsersquo
lsquoploterrcorrrsquo lsquoplotinerrcorrrsquo[nettr] = train(netxtxiai)y = net(xxiai)e = gsubtract(ty)performance = perform(netty)trainTargets = gmultiply(ttrtrainMask)valTargets = gmultiply(ttrvalMask)testTargets = gmultiply(ttrtestMask)trainPerformance = perform(nettrainTargetsy)valPerformance = perform(netvalTargetsy)testPerformance = perform(nettestTargetsy)view(net) Plots Uncomment these lines to enable various plotsfigure plotperform(tr)figure plottrainstate(tr)figure plotresponse(ty)figure ploterrcorr(e)figure plotinerrcorr(xe)netc = closeloop(net)[xcxicaictc] = preparets(netcT)yc = netc(xcxicaic)perfc = perform(nettcyc)[x1xioaiot] = preparets(netT)[y1xfoafo] = net(x1xioaio)[netcxicaic] = closeloop(netxfoafo)[y2xfcafc] = netc(cell(05)xicaic)nets = removedelay(net)[xsxisaists] = preparets(netsT)ys = nets(xsxisais)stepAheadPerformance = perform(nettsys)genFunction(net lsquomyNeuralNetworkFunctionrsquo)
y = myNeuralNetworkFunction(xxiai)endif (false)
genFunction(net lsquomyNeuralNetworkFunctionrsquo lsquoMatrixOnlyrsquo lsquoyesrsquo)x1 = cell2mat(x(1))xi1 = cell2mat(xi(1))y = myNeuralNetworkFunction(x1xi1)
endif (false)
gensim(net)end
Box 1
Mathematical Problems in Engineering 11
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request Seethe Appendix
Conflicts of Interest
The authors declare that they have no conflicts of interest
Acknowledgments
The study is funded by Scientific and Technological SupportProgram of the Ministry of Science and Technology ofPeoplersquos Republic of China (2014BAH23F01)
References
[1] L R Dhumne ldquoElectronic commerce a current trendrdquo Interna-tional Journal on Information Technology Management 2012
[2] X Q Zhang and S W Chen ldquoForecast of Chinas ForestationArea Based on ARIMA Modelrdquo Chinese Forestry Science ampTechnology vol 5 no 2 pp 50ndash55 2010
[3] K W Wang C Deng and J P Li ldquoHybrid methodology fortuberculosis incidence time-series forecasting based onARIMAand a NAR neural networkrdquo Epidemiology amp Infection vol 12017
[4] S Wei D Zuo and J Song ldquoImproving prediction accuracy ofriver discharge time series using aWavelet-NARartificial neuralnetworkrdquo Journal of Hydroinformatics vol 14 no 4 pp 974ndash991 2012
[5] L Yu L Zhou L Tan et al ldquoApplication of a new hybridmodel with seasonal auto-regressive integrated moving aver-age (ARIMA) and nonlinear auto-regressive neural network(NARNN) in forecasting incidence cases of HFMD in Shen-zhen Chinardquo PLoS ONE vol 9 no 6 2014
[6] T Van Calster B Baesens and W Lemahieu ldquoProfARIMA Aprofit-driven order identification algorithm for ARIMAmodelsin sales forecastingrdquo Applied So Computing vol 60 pp 775ndash785 2017
[7] P Ramos N Santos and R Rebelo ldquoPerformance of statespace andARIMAmodels for consumer retail sales forecastingrdquoRobotics and Computer-Integrated Manufacturing vol 34 pp151ndash163 2015
[8] D Wei P Geng L Ying and S Li ldquoA prediction study on e-commerce sales based on structure time series model and websearch datardquo in Proceedings of the 26th Chinese Control andDecision Conference CCDC 2014 pp 5346ndash5351 China June2014
[9] P Geng L Na and L Ben-Fu ldquoResearch on the Predictionof E-commerce Transaction Volume - Based on the PredictionModel of Search Data and Commodity Classification in Sta-tionrdquoManagement Modernization vol 2 pp 30ndash32 2014
[10] J Yu and X Le ldquoSales forecast for amazon sales based ondifferent statistics methodologiesrdquo ICEME vol 12 2016
[11] Y Miao Research on Mid - Season Sales Forecast Based onMachine Learning eory Zhejiang University of Technology2015
[12] L Ye and D D Fu ldquoExperience of He Ruoping using medicinein treating bladder tumorrdquo Journal of Zhejiang Chinese MedicineUniversity vol 39 no 1 pp 28ndash34 2015
[13] P Doganis A Alexandridis P Patrinos and H SarimveisldquoTime series sales forecasting for short shelf-life food productsbased on artificial neural networks and evolutionary comput-ingrdquo Journal of Food Engineering vol 75 no 2 pp 196ndash2042006
[14] P H Franses and R Legerstee ldquoCombining SKU-level salesforecasts from models and expertsrdquo Expert Systems with Appli-cations vol 38 no 3 pp 2365ndash2370 2011
[15] Y Weng and H Feng ldquoResearch online store sale forcast modelbased on BP neural networkrdquo Journal of Minjiang University2016
[16] P Qin and C Cheng ldquoPrediction of Seawall Settlement Basedon a Combined LS-ARIMA ModelrdquoMathematical Problems inEngineering vol 2017 Article ID 7840569 7 pages 2017
[17] Y E Shao ldquoPrediction of Currency Volume Issued in TaiwanUsing a Hybrid Artificial Neural Network andMultiple Regres-sion Approachrdquo Mathematical Problems in Engineering vol2013 Article ID 676742 9 pages 2013
[18] J Huang Y Tang and S Chen ldquoEnergy Demand ForecastingCombining Cointegration Analysis and Artificial IntelligenceAlgorithmrdquo Mathematical Problems in Engineering vol 2018Article ID 5194810 13 pages 2018
[19] J M P Menezes Jr and G A Barreto ldquoLong-term time seriesprediction with the NARX network An empirical evaluationrdquoNeurocomputing vol 71 no 16-18 pp 3335ndash3343 2008
[20] K Prabakaran C Sivapragasam C Jeevapriya and A Nar-matha ldquoForecasting Cultivated Areas And Production OfWheat In India Using ARIMA Modelrdquo Golden Researchoughts vol 3 no 3 pp 281ndash289 2013
[21] O Kaynar and S Tastan ldquoZaman serileri tahmininde arima-mlp melez modelirdquo Ataturk University Journal of EconomicsAdministrative Science 2010
[22] M Qin and Z Du Red tide time series forecasting by combiningARIMA and deep belief network Elsevier Science Publishers2017
[23] S Barak and S S Sadegh ldquoForecasting energy consumptionusing ensemble ARIMA-ANFIS hybrid algorithmrdquo Interna-tional Journal of Electrical Power amp Energy Systems vol 82 pp92ndash104 2016
[24] R Bonetto and M Rossi ldquoParallel multi-step ahead powerdemand forecasting throughNARneural networksrdquo in Proceed-ings of the 7th IEEE International Conference on Smart GridCommunications SmartGridComm 2016 pp 314ndash319 AustraliaNovember 2016
[25] M Sharafi H Ghaem H R Tabatabaee and H FaramarzildquoForecasting the number of zoonotic cutaneous leishmaniasiscases in south of Fars province Iran using seasonal ARIMAtime series methodrdquo Asian Pacific Journal of Tropical Medicinevol 10 no 1 pp 79ndash86 2017
[26] E Cadenas W Rivera R Campos-Amezcua and C HeardldquoWind speed prediction using a univariate ARIMAmodel and amultivariate NARXmodelrdquo Energies vol 9 no 2 pp 1ndash15 2016
[27] R Gamberini F Lolli B Rimini and F Sgarbossa ldquoForecastingof sporadic demand patterns with seasonality and trend com-ponents An empirical comparison between holt-winters and(s)ARIMA methodsrdquo Mathematical Problems in Engineeringvol 2010 Article ID 579010 15 pages 2010
[28] M A Rahman and L Casanovas ldquoStrategies to Predict E-Commerce Inventory and Order Planningrdquo International Jour-nal of Technology Diffusion vol 8 no 4 pp 17ndash30 2017
12 Mathematical Problems in Engineering
[29] S Li andR Li ldquoComparison of forecasting energy consumptionin Shandong China Using the ARIMA model GMmodel andARIMA-GMmodelrdquo Sustainability vol 9 no 7 2017
[30] MHAmini A Kargarian andOKarabasoglu ldquoARIMA-baseddecoupled time series forecasting of electric vehicle chargingdemand for stochastic power system operationrdquo Electric PowerSystems Research vol 140 pp 378ndash390 2016
[31] P SenM Roy andP Pal ldquoApplication ofARIMA for forecastingenergy consumption and GHG emission A case study of anIndian pig iron manufacturing organizationrdquo Energy vol 116pp 1031ndash1038 2016
Hindawiwwwhindawicom Volume 2018
MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Applied MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Probability and StatisticsHindawiwwwhindawicom Volume 2018
Journal of
Hindawiwwwhindawicom Volume 2018
Mathematical PhysicsAdvances in
Complex AnalysisJournal of
Hindawiwwwhindawicom Volume 2018
OptimizationJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
Hindawiwwwhindawicom Volume 2018
Operations ResearchAdvances in
Journal of
Hindawiwwwhindawicom Volume 2018
Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018
International Journal of Mathematics and Mathematical Sciences
Hindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018Volume 2018
Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in
Nature and SocietyHindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Dierential EquationsInternational Journal of
Volume 2018
Hindawiwwwhindawicom Volume 2018
Decision SciencesAdvances in
Hindawiwwwhindawicom Volume 2018
AnalysisInternational Journal of
Hindawiwwwhindawicom Volume 2018
Stochastic AnalysisInternational Journal of
Submit your manuscripts atwwwhindawicom
Mathematical Problems in Engineering 5
ECS-ARIMA
Time series historical data
Residual sequence ECS-NAR
Forecast result
Forecast result
ARIMA-NAR combined model
Figure 2 The ARIMA-NARNN combined model principle
34 Predictive Evaluation Method We use the mean relativeerror (MRE) correlation coefficient R2 and root meansquare error (RMSE) to evaluate the accuracy of fitting andprediction of each model [27]
119872119877119864 = 1119899119899sum119894=1
1003816100381610038161003816119910119894 minus 1199101198941003816100381610038161003816119910119894 times 100 (12)
1198772 = 119899sum119899119894=1 119910119894119910119894 minus sum119899119894=1 119910119894 sum119899119894=1 119910119894radic119899sum119899119894=1 1199102119894 minus (sum119899119894=1 119910119894)2radic119899sum119899119894=1 1199102119894 minus (sum119899119894=1 119910119894)2 (13)
119877119872119878119864 = radic119872119878119864 = radic 1119899119899sum119894=1
(119910119894 minus 119910119894)2 (14)
where 119910119894 is the true value of ECS 119910119894 is the predictive valueof ECS and n is the number of ECS samples
4 Case Study
We selected a total of 60 types of e-commerce items fromthe Jingdong Company in China as an empirical researchobject The types of items include food beverages householdappliances fresh food household goods baby productstoys home textiles clothing footwear etc Each time seriesof e-commerce items we selected is from January 2014 toMarch 2017 a total of 167 weekly sales data sets for onetime series Outliers due to promotions and price changeswill be removed and reinterpolated Then based on thepreprocessed data the ECS-ARIMA ECS-NARNN and theARIMA-NARNN combined models are respectively used topredict the ECS that we selected and finally the predictionerrors of the three models are compared by using (12) and(14)
For this time series a total of 167 weekly sales data setswere used formodeling and forecasting and the top 85 (iea total of 142 sets of weekly sales data from January 06 2014to September 19 2016)were selected as themodel training setThe last 15 (ie a total of 25 sets of weekly sales data fromSeptember 26 2016 to March 13 2017) were used as a test setA two-sided P value of le 005 was regarded as significant
In order to fully demonstrate the process of the casestudy from Sections 41ndash43 a time series (e-commerce salesdata for a single food item) was selected as the object to
0
100
200
300
400
01 04 07 10 01 04 07 10 01 04 072014 2015 2016
Figure 3 Original time series graph of a single food item
be described In Section 44 the results of a comprehensiveanalysis of 60 time series consisting of 60 e-commerceproducts will be presented
41 ARIMA for ECS Forecasting Based on Eviews 80 soft-ware the ARIMA model is used to predict to the ECS Atfirst the ECS model training set is plotted as Figure 3 Thissequence shows dramatic fluctuations with some tendencyand the possible seasonality therefore the (S)ARIMA pro-cess is considered for this time series
The nonstationary sequence shown in Figure 3 is differ-entiated and the stationarity test of differential sequence isperformed using the augmented dickey-fuller (ADF) test
From Table 1 the first-order differential sequence is astationary sequence at a significant level of 005 so d = 1 andD = 0 in the ECS-ARIMA model
From Figure 4 both graphs are trailing And possible(S)ARIMAmodels are identified by Eviews and the best oneis selected as SARIMA (2 1 3)(1 0 1)52 Finally we use Eviewsto predict the total 25weekly sales data of the test sample fromSeptember 26 2016 to March 13 2017 The predicted resultsare in Figure 5
42 NARNN for ECS Forecasting We use neural networktoolbox of Matlab2014b to construct a NARNN structure anduse the trial-and-error method to construct the model with
6 Mathematical Problems in Engineering
Autocorrelation Partial Correlation AC PAC Q-Stat Prob
Figure 4 Autocorrelation and partial autocorrelation functions graph of the first-order differential sequence
Table 1 ADF test of first-order differential sequence
Null Hypothesis D(DLOGDATA) has a unit rootExogenous ConstantLag Length 5 (Automatic - based on SIC maxlag=13)
t-Statistic Problowast
Augmented Dickey-Fuller test statistic -1036760 00000Test critical values 1 level -3479656
5 level -288307310 level -2578331
the number of hidden layer neurons from5 to 40 respectively(debugging shows that when the number of neurons exceeds40 network training time will become longer) The analysisshows that the goods needed to predict for Jingdong is toomuch not suitable for an extended training time that is aftermore than 40 model predictive performance improvementis not enough to make up for the training time loss Sinceinput weights and thresholds directly affect the performanceof the neural network each model is trained 10 timesand the root mean square error (RMSE) and the decisioncoefficient 1198772 of training results are recorded as shown inFigure 6
From Figure 6 as the number of hidden neuronsincreases RMSE decreases firstly and 1198772 increases A changeto the opposite direction begins to occur after reaching20 indicating that as the number increases the tendencyto coordinate results in reduced ability to generalize and
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
Wee
kly
sale
s
Actual valuePrediction from ARIMA
Figure 5 Real values and ARIMAmodel predictive values
finally get the best number of hidden layer neurons of17 Network training and debugging results are shown inFigures 7 and 8
From Figure 7 only the confidence interval of the errorautocorrelation coefficient exceeds 95 when the delay lagorder is 0 The correlation coefficients of the other ordersare within 95 confidence intervals and then the relevanceof information has been fully extracted This illustrates this
Mathematical Problems in Engineering 7
3448
2346
18591978
2459
29062435
2182
0
5
10
15
20
25
30
35
40
5 10 15 20 25 30 35 40
MSE
Hidden layer neurons number
07312
08354
0880909134
08597
0785208109
08447
06
065
07
075
08
085
09
095
5 10 15 20 25 30 35 40Hidden layer neurons number
R^2
Figure 6 MSE and 1198772 under different hidden neurons
Lag
minus500
0
500
1000
1500
2000
2500
Cor
rela
tion
Autocorrelation of Error 1
CorrelationsZero CorrelationConfidence Limit
minus20 minus15 minus10 minus5 0 5 10 15 20
Figure 7 The network residual autocorrelation map when thenumber of hidden neurons is 17
model is for purpose and then get the error graph shown inFigure 8
The final result is shown in Figure 9
43 ARIMA-NARNN for ECS Forecasting ARIMA-NARNNcombination prediction ismainly completed by the following
(1) Calculating the residual sequence 119890119905 = 119910119905 minus 119871 119905(2) Using the NARNN prediction to obtain the predicted
sequence value 119873119905 of the nonlinear prediction part based onthe obtained residual sequence 119890119905
(3) Calculating the sales forecast result 119910119905 = 119871 119905 + 119873119905 ofthe ARIMA-NARNN model based on the prediction resultsof ARIMA model in 41 and the nonlinear part residualprediction values obtained in (2)
From Figure 10 only the autocorrelation coefficient ofthe error whose delay lag order is 0 exceeds 95 confidenceintervals The autocorrelation coefficients of the other ordersare within 95 confidence intervals and fluctuate around the0 value indicating that the model is reasonable and credibleAt the same time its model error is shown in Figure 11
minus100
0
100
200
300
400
500
Out
put a
nd T
arge
t
Response of Output Element 1 for Time-Series 1
20 40 60 80 100 120 140 160Time
20 40 60 80 100 120 140 160Time
minus500
0
500
Erro
r
Training TargetsTraining OutputsValidation TargetsValidation Outputs
Test TargetsTest OutputsErrorsResponse
Targets - Outputs
Figure 8 The error graph of the NARNN fitting model
The errors of NARNN are shown in Figure 11 The errorsof training set verification set and test set vary little withtime and the residuals in the previous period are close tozero In the later period although the residuals have becomebigger than before the overall error is within the acceptablerange and fluctuates around the zero value indicating that theestablished neural network model is credible and can be usedfor prediction of future residuals So based on this networkthe forecast result is shown in Figure 12
This article uses weekly sales data from January 062014 to September 19 2016 as the experimental set datafrom September 26 2016 to January 13 2017 as a test setusing the MRE and RMSE to compare the fitting error
8 Mathematical Problems in Engineering
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from NARNN
Figure 9 Actual values and predicted values from ECS-NARNN
Lag
minus400minus200
0200400600800
1000120014001600
Cor
rela
tion
Autocorrelation of Error 1
CorrelationsZero CorrelationConfidence Limit
minus20 minus15 minus10 minus5 0 5 10 15 20
Figure 10 Error correlation diagram of using NARNN to fit theresidual of ARIMA
and prediction error of ECS-ARIMA ECS-NARNN andARIMA-NARNN combined model and then evaluate thepredictive performance of each model
The predicted and actual values of the three models arecompared as shown in Figure 13
From Figure 13 the predicted value of the three modelsin the test set fits well with the real value and the predictionperformance is also good The ARIMA-NARNN model hasa higher fitting degree for predicted values and real valuesHowever the result is only for a single time series in orderto verify the universal superiority of the ARIMA-NARNNmodel the same analysis process will be performed for theother 59 time series of different e-commerce items sales Thetypes of items include food beverages household appliancesfresh food household goods baby products toys hometextiles clothing footwear etc
minus200minus150minus100minus50
050
100150200250
Out
put a
nd T
arge
t
Response of Output Element 1 for Time-Series 1
Training TargetsTraining OutputsValidation TargetsValidation Outputs
Test TargetsTest OutputsErrorsResponse
20 40 60 80 100 120 140 160Time
20 40 60 80 100 120 140 160Time
minus2000
200400
Erro
rTargets - Outputs
Figure 11 Error of using NARNN to fit the residual of ARIMA
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from ARIMA-NARNN
Figure 12 The prediction of using ARIMA-NARNN combinedmodel and actual values
44 Model Comparison and Discussion In the 60 time seriesof different e-commerce products the trend and season-ality of them are not exactly the same For different timeseries features different analysis methods (ie ARIMA orSARIMA) will be usedThe final analysis results are shown inFigure 14
It can be seen in Figure 14 that the RMSE of ARIMA-NARNN is generally lower than that of ARIMAandNARNNIn order to quantitatively compare the effects of the threemodels average of the MRE and RMSE for 60 e-commerce
Mathematical Problems in Engineering 9
Table 2 Average of the MRE and RMSE for 60 e-commerce products of fitting and prediction
Model Fitting error Prediction errorMRE RMSE MRE RMSE
ARIMA 00998 283451 01389 318082NARNN 00879 191893 01016 255668ARIMA-NARNN 00703 129549 009012 232321
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from ARIMAPrediction from NARNNPrediction from ARIMA-NARNN
Figure 13 Actual values and the predicted values from the threemodels
products of fitting and prediction was calculated by using (12)and (14) Table 2 shows the calculation results
The fitting and forecasting performance of the threemodels for Jingdongrsquos weekly sales data is shown in Table 2It can be seen that both the MRE and RMSE of the ARIMA-NARNN combined model are the lowest in model fitting andmodel prediction Therefore the ARIMA-NARNN combina-tion model is the best the ECS-NARNN is the second andthe ECS-ARIMA model is the worst
5 Conclusion
The ECS studied in this paper often has two characteristicslinearity and nonlinearity We choose the e-commerce salestime series of many single products from Jingdong Companyin China as empirical analysis data sets and forecast thetime series of weekly sales by ECS-ARIMA model Wefind that the model has good adaptability to the linearpatterns of e-commerce sales and low fitness to nonlinearpatterns which has a big local error When ECS-NARNNmodel is used to predict it is found that the model canwell realize the nonlinear mapping process However itis easy to cause underfitting and overfitting because ofpoor control of the model structure and the prediction oflinear components is not as effective as the ECS-ARIMAmodel
0 10 20 30 40 6050E-commerce product id
15
20
25
30
35
40
RMSE
ARIMANARNNARIMA-NARNN
Figure 14 RMSE of 60 time series of e-commerce products fromthe ARIMA NARNN and ARIMA-NARNNmodels
We set up the ARIMA-NARNN combined model Specif-ically we use the ECS-ARIMA model to predict linearcomponents of the time series and use the predictedresidual of the ARIMA as a nonlinear component Atlast we predict the nonlinear component by using theECS-NARNN Our case study shows that the ARIMA-NARNN outperforms the ECS-ARIMA and ECS-NARNNmodels in terms of the prediction accuracy which is welladapted to the forecasting of ECS with linear and nonlinearcharacteristics
In the actual application of EC companies the idea ofthis research can be used to forecast the sales of differenttypes of e-commerce products Depending on the salesfrequency of different types of products different forecastingdurations can be selected to use this more effective ARIMA-NARNN combined model to predict sales in a future periodof time Therefore according to this precise forecast theenterprisersquos inventory strategy and logistics strategy can bemore rationally formulated so that the entire supply chain canoperate more smoothly
Appendix
A Matlab Code
See Box 1
10 Mathematical Problems in Engineering
solved by NARNN based on matlab rawdata is a weekly sales data of chocolate of the JDCOMrawdata=dataT = tonndata(rawdatafalsefalse) lsquotrainlmrsquo is usually fastest lsquotrainbrrsquo takes longer but may be better for challenging problems lsquotrainscgrsquo uses less memory NTSTOOL falls back to this in low memory situationstrainFcn = lsquotrainbrrsquo Bayesian RegularizationfeedbackDelays = 13hiddenLayerSize = 17net = narnet(feedbackDelayshiddenLayerSize lsquoopenrsquotrainFcn)netinputprocessFcns = lsquoremoveconstantrowsrsquo lsquomapminmaxrsquo[xxiait] = preparets(netT)netdivideFcn = lsquodividerandrsquo Divide data randomlynetdivideMode = lsquotimersquo Divide up every valuenetdivideParamtrainRatio = 70100netdivideParamvalRatio = 15100netdivideParamtestRatio = 15100netperformFcn = lsquomsersquonetplotFcns = lsquoplotperformrsquo lsquoplottrainstatersquo lsquoplotresponsersquo
lsquoploterrcorrrsquo lsquoplotinerrcorrrsquo[nettr] = train(netxtxiai)y = net(xxiai)e = gsubtract(ty)performance = perform(netty)trainTargets = gmultiply(ttrtrainMask)valTargets = gmultiply(ttrvalMask)testTargets = gmultiply(ttrtestMask)trainPerformance = perform(nettrainTargetsy)valPerformance = perform(netvalTargetsy)testPerformance = perform(nettestTargetsy)view(net) Plots Uncomment these lines to enable various plotsfigure plotperform(tr)figure plottrainstate(tr)figure plotresponse(ty)figure ploterrcorr(e)figure plotinerrcorr(xe)netc = closeloop(net)[xcxicaictc] = preparets(netcT)yc = netc(xcxicaic)perfc = perform(nettcyc)[x1xioaiot] = preparets(netT)[y1xfoafo] = net(x1xioaio)[netcxicaic] = closeloop(netxfoafo)[y2xfcafc] = netc(cell(05)xicaic)nets = removedelay(net)[xsxisaists] = preparets(netsT)ys = nets(xsxisais)stepAheadPerformance = perform(nettsys)genFunction(net lsquomyNeuralNetworkFunctionrsquo)
y = myNeuralNetworkFunction(xxiai)endif (false)
genFunction(net lsquomyNeuralNetworkFunctionrsquo lsquoMatrixOnlyrsquo lsquoyesrsquo)x1 = cell2mat(x(1))xi1 = cell2mat(xi(1))y = myNeuralNetworkFunction(x1xi1)
endif (false)
gensim(net)end
Box 1
Mathematical Problems in Engineering 11
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request Seethe Appendix
Conflicts of Interest
The authors declare that they have no conflicts of interest
Acknowledgments
The study is funded by Scientific and Technological SupportProgram of the Ministry of Science and Technology ofPeoplersquos Republic of China (2014BAH23F01)
References
[1] L R Dhumne ldquoElectronic commerce a current trendrdquo Interna-tional Journal on Information Technology Management 2012
[2] X Q Zhang and S W Chen ldquoForecast of Chinas ForestationArea Based on ARIMA Modelrdquo Chinese Forestry Science ampTechnology vol 5 no 2 pp 50ndash55 2010
[3] K W Wang C Deng and J P Li ldquoHybrid methodology fortuberculosis incidence time-series forecasting based onARIMAand a NAR neural networkrdquo Epidemiology amp Infection vol 12017
[4] S Wei D Zuo and J Song ldquoImproving prediction accuracy ofriver discharge time series using aWavelet-NARartificial neuralnetworkrdquo Journal of Hydroinformatics vol 14 no 4 pp 974ndash991 2012
[5] L Yu L Zhou L Tan et al ldquoApplication of a new hybridmodel with seasonal auto-regressive integrated moving aver-age (ARIMA) and nonlinear auto-regressive neural network(NARNN) in forecasting incidence cases of HFMD in Shen-zhen Chinardquo PLoS ONE vol 9 no 6 2014
[6] T Van Calster B Baesens and W Lemahieu ldquoProfARIMA Aprofit-driven order identification algorithm for ARIMAmodelsin sales forecastingrdquo Applied So Computing vol 60 pp 775ndash785 2017
[7] P Ramos N Santos and R Rebelo ldquoPerformance of statespace andARIMAmodels for consumer retail sales forecastingrdquoRobotics and Computer-Integrated Manufacturing vol 34 pp151ndash163 2015
[8] D Wei P Geng L Ying and S Li ldquoA prediction study on e-commerce sales based on structure time series model and websearch datardquo in Proceedings of the 26th Chinese Control andDecision Conference CCDC 2014 pp 5346ndash5351 China June2014
[9] P Geng L Na and L Ben-Fu ldquoResearch on the Predictionof E-commerce Transaction Volume - Based on the PredictionModel of Search Data and Commodity Classification in Sta-tionrdquoManagement Modernization vol 2 pp 30ndash32 2014
[10] J Yu and X Le ldquoSales forecast for amazon sales based ondifferent statistics methodologiesrdquo ICEME vol 12 2016
[11] Y Miao Research on Mid - Season Sales Forecast Based onMachine Learning eory Zhejiang University of Technology2015
[12] L Ye and D D Fu ldquoExperience of He Ruoping using medicinein treating bladder tumorrdquo Journal of Zhejiang Chinese MedicineUniversity vol 39 no 1 pp 28ndash34 2015
[13] P Doganis A Alexandridis P Patrinos and H SarimveisldquoTime series sales forecasting for short shelf-life food productsbased on artificial neural networks and evolutionary comput-ingrdquo Journal of Food Engineering vol 75 no 2 pp 196ndash2042006
[14] P H Franses and R Legerstee ldquoCombining SKU-level salesforecasts from models and expertsrdquo Expert Systems with Appli-cations vol 38 no 3 pp 2365ndash2370 2011
[15] Y Weng and H Feng ldquoResearch online store sale forcast modelbased on BP neural networkrdquo Journal of Minjiang University2016
[16] P Qin and C Cheng ldquoPrediction of Seawall Settlement Basedon a Combined LS-ARIMA ModelrdquoMathematical Problems inEngineering vol 2017 Article ID 7840569 7 pages 2017
[17] Y E Shao ldquoPrediction of Currency Volume Issued in TaiwanUsing a Hybrid Artificial Neural Network andMultiple Regres-sion Approachrdquo Mathematical Problems in Engineering vol2013 Article ID 676742 9 pages 2013
[18] J Huang Y Tang and S Chen ldquoEnergy Demand ForecastingCombining Cointegration Analysis and Artificial IntelligenceAlgorithmrdquo Mathematical Problems in Engineering vol 2018Article ID 5194810 13 pages 2018
[19] J M P Menezes Jr and G A Barreto ldquoLong-term time seriesprediction with the NARX network An empirical evaluationrdquoNeurocomputing vol 71 no 16-18 pp 3335ndash3343 2008
[20] K Prabakaran C Sivapragasam C Jeevapriya and A Nar-matha ldquoForecasting Cultivated Areas And Production OfWheat In India Using ARIMA Modelrdquo Golden Researchoughts vol 3 no 3 pp 281ndash289 2013
[21] O Kaynar and S Tastan ldquoZaman serileri tahmininde arima-mlp melez modelirdquo Ataturk University Journal of EconomicsAdministrative Science 2010
[22] M Qin and Z Du Red tide time series forecasting by combiningARIMA and deep belief network Elsevier Science Publishers2017
[23] S Barak and S S Sadegh ldquoForecasting energy consumptionusing ensemble ARIMA-ANFIS hybrid algorithmrdquo Interna-tional Journal of Electrical Power amp Energy Systems vol 82 pp92ndash104 2016
[24] R Bonetto and M Rossi ldquoParallel multi-step ahead powerdemand forecasting throughNARneural networksrdquo in Proceed-ings of the 7th IEEE International Conference on Smart GridCommunications SmartGridComm 2016 pp 314ndash319 AustraliaNovember 2016
[25] M Sharafi H Ghaem H R Tabatabaee and H FaramarzildquoForecasting the number of zoonotic cutaneous leishmaniasiscases in south of Fars province Iran using seasonal ARIMAtime series methodrdquo Asian Pacific Journal of Tropical Medicinevol 10 no 1 pp 79ndash86 2017
[26] E Cadenas W Rivera R Campos-Amezcua and C HeardldquoWind speed prediction using a univariate ARIMAmodel and amultivariate NARXmodelrdquo Energies vol 9 no 2 pp 1ndash15 2016
[27] R Gamberini F Lolli B Rimini and F Sgarbossa ldquoForecastingof sporadic demand patterns with seasonality and trend com-ponents An empirical comparison between holt-winters and(s)ARIMA methodsrdquo Mathematical Problems in Engineeringvol 2010 Article ID 579010 15 pages 2010
[28] M A Rahman and L Casanovas ldquoStrategies to Predict E-Commerce Inventory and Order Planningrdquo International Jour-nal of Technology Diffusion vol 8 no 4 pp 17ndash30 2017
12 Mathematical Problems in Engineering
[29] S Li andR Li ldquoComparison of forecasting energy consumptionin Shandong China Using the ARIMA model GMmodel andARIMA-GMmodelrdquo Sustainability vol 9 no 7 2017
[30] MHAmini A Kargarian andOKarabasoglu ldquoARIMA-baseddecoupled time series forecasting of electric vehicle chargingdemand for stochastic power system operationrdquo Electric PowerSystems Research vol 140 pp 378ndash390 2016
[31] P SenM Roy andP Pal ldquoApplication ofARIMA for forecastingenergy consumption and GHG emission A case study of anIndian pig iron manufacturing organizationrdquo Energy vol 116pp 1031ndash1038 2016
Hindawiwwwhindawicom Volume 2018
MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Applied MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Probability and StatisticsHindawiwwwhindawicom Volume 2018
Journal of
Hindawiwwwhindawicom Volume 2018
Mathematical PhysicsAdvances in
Complex AnalysisJournal of
Hindawiwwwhindawicom Volume 2018
OptimizationJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
Hindawiwwwhindawicom Volume 2018
Operations ResearchAdvances in
Journal of
Hindawiwwwhindawicom Volume 2018
Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018
International Journal of Mathematics and Mathematical Sciences
Hindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018Volume 2018
Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in
Nature and SocietyHindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Dierential EquationsInternational Journal of
Volume 2018
Hindawiwwwhindawicom Volume 2018
Decision SciencesAdvances in
Hindawiwwwhindawicom Volume 2018
AnalysisInternational Journal of
Hindawiwwwhindawicom Volume 2018
Stochastic AnalysisInternational Journal of
Submit your manuscripts atwwwhindawicom
6 Mathematical Problems in Engineering
Autocorrelation Partial Correlation AC PAC Q-Stat Prob
Figure 4 Autocorrelation and partial autocorrelation functions graph of the first-order differential sequence
Table 1 ADF test of first-order differential sequence
Null Hypothesis D(DLOGDATA) has a unit rootExogenous ConstantLag Length 5 (Automatic - based on SIC maxlag=13)
t-Statistic Problowast
Augmented Dickey-Fuller test statistic -1036760 00000Test critical values 1 level -3479656
5 level -288307310 level -2578331
the number of hidden layer neurons from5 to 40 respectively(debugging shows that when the number of neurons exceeds40 network training time will become longer) The analysisshows that the goods needed to predict for Jingdong is toomuch not suitable for an extended training time that is aftermore than 40 model predictive performance improvementis not enough to make up for the training time loss Sinceinput weights and thresholds directly affect the performanceof the neural network each model is trained 10 timesand the root mean square error (RMSE) and the decisioncoefficient 1198772 of training results are recorded as shown inFigure 6
From Figure 6 as the number of hidden neuronsincreases RMSE decreases firstly and 1198772 increases A changeto the opposite direction begins to occur after reaching20 indicating that as the number increases the tendencyto coordinate results in reduced ability to generalize and
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
Wee
kly
sale
s
Actual valuePrediction from ARIMA
Figure 5 Real values and ARIMAmodel predictive values
finally get the best number of hidden layer neurons of17 Network training and debugging results are shown inFigures 7 and 8
From Figure 7 only the confidence interval of the errorautocorrelation coefficient exceeds 95 when the delay lagorder is 0 The correlation coefficients of the other ordersare within 95 confidence intervals and then the relevanceof information has been fully extracted This illustrates this
Mathematical Problems in Engineering 7
3448
2346
18591978
2459
29062435
2182
0
5
10
15
20
25
30
35
40
5 10 15 20 25 30 35 40
MSE
Hidden layer neurons number
07312
08354
0880909134
08597
0785208109
08447
06
065
07
075
08
085
09
095
5 10 15 20 25 30 35 40Hidden layer neurons number
R^2
Figure 6 MSE and 1198772 under different hidden neurons
Lag
minus500
0
500
1000
1500
2000
2500
Cor
rela
tion
Autocorrelation of Error 1
CorrelationsZero CorrelationConfidence Limit
minus20 minus15 minus10 minus5 0 5 10 15 20
Figure 7 The network residual autocorrelation map when thenumber of hidden neurons is 17
model is for purpose and then get the error graph shown inFigure 8
The final result is shown in Figure 9
43 ARIMA-NARNN for ECS Forecasting ARIMA-NARNNcombination prediction ismainly completed by the following
(1) Calculating the residual sequence 119890119905 = 119910119905 minus 119871 119905(2) Using the NARNN prediction to obtain the predicted
sequence value 119873119905 of the nonlinear prediction part based onthe obtained residual sequence 119890119905
(3) Calculating the sales forecast result 119910119905 = 119871 119905 + 119873119905 ofthe ARIMA-NARNN model based on the prediction resultsof ARIMA model in 41 and the nonlinear part residualprediction values obtained in (2)
From Figure 10 only the autocorrelation coefficient ofthe error whose delay lag order is 0 exceeds 95 confidenceintervals The autocorrelation coefficients of the other ordersare within 95 confidence intervals and fluctuate around the0 value indicating that the model is reasonable and credibleAt the same time its model error is shown in Figure 11
minus100
0
100
200
300
400
500
Out
put a
nd T
arge
t
Response of Output Element 1 for Time-Series 1
20 40 60 80 100 120 140 160Time
20 40 60 80 100 120 140 160Time
minus500
0
500
Erro
r
Training TargetsTraining OutputsValidation TargetsValidation Outputs
Test TargetsTest OutputsErrorsResponse
Targets - Outputs
Figure 8 The error graph of the NARNN fitting model
The errors of NARNN are shown in Figure 11 The errorsof training set verification set and test set vary little withtime and the residuals in the previous period are close tozero In the later period although the residuals have becomebigger than before the overall error is within the acceptablerange and fluctuates around the zero value indicating that theestablished neural network model is credible and can be usedfor prediction of future residuals So based on this networkthe forecast result is shown in Figure 12
This article uses weekly sales data from January 062014 to September 19 2016 as the experimental set datafrom September 26 2016 to January 13 2017 as a test setusing the MRE and RMSE to compare the fitting error
8 Mathematical Problems in Engineering
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from NARNN
Figure 9 Actual values and predicted values from ECS-NARNN
Lag
minus400minus200
0200400600800
1000120014001600
Cor
rela
tion
Autocorrelation of Error 1
CorrelationsZero CorrelationConfidence Limit
minus20 minus15 minus10 minus5 0 5 10 15 20
Figure 10 Error correlation diagram of using NARNN to fit theresidual of ARIMA
and prediction error of ECS-ARIMA ECS-NARNN andARIMA-NARNN combined model and then evaluate thepredictive performance of each model
The predicted and actual values of the three models arecompared as shown in Figure 13
From Figure 13 the predicted value of the three modelsin the test set fits well with the real value and the predictionperformance is also good The ARIMA-NARNN model hasa higher fitting degree for predicted values and real valuesHowever the result is only for a single time series in orderto verify the universal superiority of the ARIMA-NARNNmodel the same analysis process will be performed for theother 59 time series of different e-commerce items sales Thetypes of items include food beverages household appliancesfresh food household goods baby products toys hometextiles clothing footwear etc
minus200minus150minus100minus50
050
100150200250
Out
put a
nd T
arge
t
Response of Output Element 1 for Time-Series 1
Training TargetsTraining OutputsValidation TargetsValidation Outputs
Test TargetsTest OutputsErrorsResponse
20 40 60 80 100 120 140 160Time
20 40 60 80 100 120 140 160Time
minus2000
200400
Erro
rTargets - Outputs
Figure 11 Error of using NARNN to fit the residual of ARIMA
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from ARIMA-NARNN
Figure 12 The prediction of using ARIMA-NARNN combinedmodel and actual values
44 Model Comparison and Discussion In the 60 time seriesof different e-commerce products the trend and season-ality of them are not exactly the same For different timeseries features different analysis methods (ie ARIMA orSARIMA) will be usedThe final analysis results are shown inFigure 14
It can be seen in Figure 14 that the RMSE of ARIMA-NARNN is generally lower than that of ARIMAandNARNNIn order to quantitatively compare the effects of the threemodels average of the MRE and RMSE for 60 e-commerce
Mathematical Problems in Engineering 9
Table 2 Average of the MRE and RMSE for 60 e-commerce products of fitting and prediction
Model Fitting error Prediction errorMRE RMSE MRE RMSE
ARIMA 00998 283451 01389 318082NARNN 00879 191893 01016 255668ARIMA-NARNN 00703 129549 009012 232321
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from ARIMAPrediction from NARNNPrediction from ARIMA-NARNN
Figure 13 Actual values and the predicted values from the threemodels
products of fitting and prediction was calculated by using (12)and (14) Table 2 shows the calculation results
The fitting and forecasting performance of the threemodels for Jingdongrsquos weekly sales data is shown in Table 2It can be seen that both the MRE and RMSE of the ARIMA-NARNN combined model are the lowest in model fitting andmodel prediction Therefore the ARIMA-NARNN combina-tion model is the best the ECS-NARNN is the second andthe ECS-ARIMA model is the worst
5 Conclusion
The ECS studied in this paper often has two characteristicslinearity and nonlinearity We choose the e-commerce salestime series of many single products from Jingdong Companyin China as empirical analysis data sets and forecast thetime series of weekly sales by ECS-ARIMA model Wefind that the model has good adaptability to the linearpatterns of e-commerce sales and low fitness to nonlinearpatterns which has a big local error When ECS-NARNNmodel is used to predict it is found that the model canwell realize the nonlinear mapping process However itis easy to cause underfitting and overfitting because ofpoor control of the model structure and the prediction oflinear components is not as effective as the ECS-ARIMAmodel
0 10 20 30 40 6050E-commerce product id
15
20
25
30
35
40
RMSE
ARIMANARNNARIMA-NARNN
Figure 14 RMSE of 60 time series of e-commerce products fromthe ARIMA NARNN and ARIMA-NARNNmodels
We set up the ARIMA-NARNN combined model Specif-ically we use the ECS-ARIMA model to predict linearcomponents of the time series and use the predictedresidual of the ARIMA as a nonlinear component Atlast we predict the nonlinear component by using theECS-NARNN Our case study shows that the ARIMA-NARNN outperforms the ECS-ARIMA and ECS-NARNNmodels in terms of the prediction accuracy which is welladapted to the forecasting of ECS with linear and nonlinearcharacteristics
In the actual application of EC companies the idea ofthis research can be used to forecast the sales of differenttypes of e-commerce products Depending on the salesfrequency of different types of products different forecastingdurations can be selected to use this more effective ARIMA-NARNN combined model to predict sales in a future periodof time Therefore according to this precise forecast theenterprisersquos inventory strategy and logistics strategy can bemore rationally formulated so that the entire supply chain canoperate more smoothly
Appendix
A Matlab Code
See Box 1
10 Mathematical Problems in Engineering
solved by NARNN based on matlab rawdata is a weekly sales data of chocolate of the JDCOMrawdata=dataT = tonndata(rawdatafalsefalse) lsquotrainlmrsquo is usually fastest lsquotrainbrrsquo takes longer but may be better for challenging problems lsquotrainscgrsquo uses less memory NTSTOOL falls back to this in low memory situationstrainFcn = lsquotrainbrrsquo Bayesian RegularizationfeedbackDelays = 13hiddenLayerSize = 17net = narnet(feedbackDelayshiddenLayerSize lsquoopenrsquotrainFcn)netinputprocessFcns = lsquoremoveconstantrowsrsquo lsquomapminmaxrsquo[xxiait] = preparets(netT)netdivideFcn = lsquodividerandrsquo Divide data randomlynetdivideMode = lsquotimersquo Divide up every valuenetdivideParamtrainRatio = 70100netdivideParamvalRatio = 15100netdivideParamtestRatio = 15100netperformFcn = lsquomsersquonetplotFcns = lsquoplotperformrsquo lsquoplottrainstatersquo lsquoplotresponsersquo
lsquoploterrcorrrsquo lsquoplotinerrcorrrsquo[nettr] = train(netxtxiai)y = net(xxiai)e = gsubtract(ty)performance = perform(netty)trainTargets = gmultiply(ttrtrainMask)valTargets = gmultiply(ttrvalMask)testTargets = gmultiply(ttrtestMask)trainPerformance = perform(nettrainTargetsy)valPerformance = perform(netvalTargetsy)testPerformance = perform(nettestTargetsy)view(net) Plots Uncomment these lines to enable various plotsfigure plotperform(tr)figure plottrainstate(tr)figure plotresponse(ty)figure ploterrcorr(e)figure plotinerrcorr(xe)netc = closeloop(net)[xcxicaictc] = preparets(netcT)yc = netc(xcxicaic)perfc = perform(nettcyc)[x1xioaiot] = preparets(netT)[y1xfoafo] = net(x1xioaio)[netcxicaic] = closeloop(netxfoafo)[y2xfcafc] = netc(cell(05)xicaic)nets = removedelay(net)[xsxisaists] = preparets(netsT)ys = nets(xsxisais)stepAheadPerformance = perform(nettsys)genFunction(net lsquomyNeuralNetworkFunctionrsquo)
y = myNeuralNetworkFunction(xxiai)endif (false)
genFunction(net lsquomyNeuralNetworkFunctionrsquo lsquoMatrixOnlyrsquo lsquoyesrsquo)x1 = cell2mat(x(1))xi1 = cell2mat(xi(1))y = myNeuralNetworkFunction(x1xi1)
endif (false)
gensim(net)end
Box 1
Mathematical Problems in Engineering 11
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request Seethe Appendix
Conflicts of Interest
The authors declare that they have no conflicts of interest
Acknowledgments
The study is funded by Scientific and Technological SupportProgram of the Ministry of Science and Technology ofPeoplersquos Republic of China (2014BAH23F01)
References
[1] L R Dhumne ldquoElectronic commerce a current trendrdquo Interna-tional Journal on Information Technology Management 2012
[2] X Q Zhang and S W Chen ldquoForecast of Chinas ForestationArea Based on ARIMA Modelrdquo Chinese Forestry Science ampTechnology vol 5 no 2 pp 50ndash55 2010
[3] K W Wang C Deng and J P Li ldquoHybrid methodology fortuberculosis incidence time-series forecasting based onARIMAand a NAR neural networkrdquo Epidemiology amp Infection vol 12017
[4] S Wei D Zuo and J Song ldquoImproving prediction accuracy ofriver discharge time series using aWavelet-NARartificial neuralnetworkrdquo Journal of Hydroinformatics vol 14 no 4 pp 974ndash991 2012
[5] L Yu L Zhou L Tan et al ldquoApplication of a new hybridmodel with seasonal auto-regressive integrated moving aver-age (ARIMA) and nonlinear auto-regressive neural network(NARNN) in forecasting incidence cases of HFMD in Shen-zhen Chinardquo PLoS ONE vol 9 no 6 2014
[6] T Van Calster B Baesens and W Lemahieu ldquoProfARIMA Aprofit-driven order identification algorithm for ARIMAmodelsin sales forecastingrdquo Applied So Computing vol 60 pp 775ndash785 2017
[7] P Ramos N Santos and R Rebelo ldquoPerformance of statespace andARIMAmodels for consumer retail sales forecastingrdquoRobotics and Computer-Integrated Manufacturing vol 34 pp151ndash163 2015
[8] D Wei P Geng L Ying and S Li ldquoA prediction study on e-commerce sales based on structure time series model and websearch datardquo in Proceedings of the 26th Chinese Control andDecision Conference CCDC 2014 pp 5346ndash5351 China June2014
[9] P Geng L Na and L Ben-Fu ldquoResearch on the Predictionof E-commerce Transaction Volume - Based on the PredictionModel of Search Data and Commodity Classification in Sta-tionrdquoManagement Modernization vol 2 pp 30ndash32 2014
[10] J Yu and X Le ldquoSales forecast for amazon sales based ondifferent statistics methodologiesrdquo ICEME vol 12 2016
[11] Y Miao Research on Mid - Season Sales Forecast Based onMachine Learning eory Zhejiang University of Technology2015
[12] L Ye and D D Fu ldquoExperience of He Ruoping using medicinein treating bladder tumorrdquo Journal of Zhejiang Chinese MedicineUniversity vol 39 no 1 pp 28ndash34 2015
[13] P Doganis A Alexandridis P Patrinos and H SarimveisldquoTime series sales forecasting for short shelf-life food productsbased on artificial neural networks and evolutionary comput-ingrdquo Journal of Food Engineering vol 75 no 2 pp 196ndash2042006
[14] P H Franses and R Legerstee ldquoCombining SKU-level salesforecasts from models and expertsrdquo Expert Systems with Appli-cations vol 38 no 3 pp 2365ndash2370 2011
[15] Y Weng and H Feng ldquoResearch online store sale forcast modelbased on BP neural networkrdquo Journal of Minjiang University2016
[16] P Qin and C Cheng ldquoPrediction of Seawall Settlement Basedon a Combined LS-ARIMA ModelrdquoMathematical Problems inEngineering vol 2017 Article ID 7840569 7 pages 2017
[17] Y E Shao ldquoPrediction of Currency Volume Issued in TaiwanUsing a Hybrid Artificial Neural Network andMultiple Regres-sion Approachrdquo Mathematical Problems in Engineering vol2013 Article ID 676742 9 pages 2013
[18] J Huang Y Tang and S Chen ldquoEnergy Demand ForecastingCombining Cointegration Analysis and Artificial IntelligenceAlgorithmrdquo Mathematical Problems in Engineering vol 2018Article ID 5194810 13 pages 2018
[19] J M P Menezes Jr and G A Barreto ldquoLong-term time seriesprediction with the NARX network An empirical evaluationrdquoNeurocomputing vol 71 no 16-18 pp 3335ndash3343 2008
[20] K Prabakaran C Sivapragasam C Jeevapriya and A Nar-matha ldquoForecasting Cultivated Areas And Production OfWheat In India Using ARIMA Modelrdquo Golden Researchoughts vol 3 no 3 pp 281ndash289 2013
[21] O Kaynar and S Tastan ldquoZaman serileri tahmininde arima-mlp melez modelirdquo Ataturk University Journal of EconomicsAdministrative Science 2010
[22] M Qin and Z Du Red tide time series forecasting by combiningARIMA and deep belief network Elsevier Science Publishers2017
[23] S Barak and S S Sadegh ldquoForecasting energy consumptionusing ensemble ARIMA-ANFIS hybrid algorithmrdquo Interna-tional Journal of Electrical Power amp Energy Systems vol 82 pp92ndash104 2016
[24] R Bonetto and M Rossi ldquoParallel multi-step ahead powerdemand forecasting throughNARneural networksrdquo in Proceed-ings of the 7th IEEE International Conference on Smart GridCommunications SmartGridComm 2016 pp 314ndash319 AustraliaNovember 2016
[25] M Sharafi H Ghaem H R Tabatabaee and H FaramarzildquoForecasting the number of zoonotic cutaneous leishmaniasiscases in south of Fars province Iran using seasonal ARIMAtime series methodrdquo Asian Pacific Journal of Tropical Medicinevol 10 no 1 pp 79ndash86 2017
[26] E Cadenas W Rivera R Campos-Amezcua and C HeardldquoWind speed prediction using a univariate ARIMAmodel and amultivariate NARXmodelrdquo Energies vol 9 no 2 pp 1ndash15 2016
[27] R Gamberini F Lolli B Rimini and F Sgarbossa ldquoForecastingof sporadic demand patterns with seasonality and trend com-ponents An empirical comparison between holt-winters and(s)ARIMA methodsrdquo Mathematical Problems in Engineeringvol 2010 Article ID 579010 15 pages 2010
[28] M A Rahman and L Casanovas ldquoStrategies to Predict E-Commerce Inventory and Order Planningrdquo International Jour-nal of Technology Diffusion vol 8 no 4 pp 17ndash30 2017
12 Mathematical Problems in Engineering
[29] S Li andR Li ldquoComparison of forecasting energy consumptionin Shandong China Using the ARIMA model GMmodel andARIMA-GMmodelrdquo Sustainability vol 9 no 7 2017
[30] MHAmini A Kargarian andOKarabasoglu ldquoARIMA-baseddecoupled time series forecasting of electric vehicle chargingdemand for stochastic power system operationrdquo Electric PowerSystems Research vol 140 pp 378ndash390 2016
[31] P SenM Roy andP Pal ldquoApplication ofARIMA for forecastingenergy consumption and GHG emission A case study of anIndian pig iron manufacturing organizationrdquo Energy vol 116pp 1031ndash1038 2016
Hindawiwwwhindawicom Volume 2018
MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Applied MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Probability and StatisticsHindawiwwwhindawicom Volume 2018
Journal of
Hindawiwwwhindawicom Volume 2018
Mathematical PhysicsAdvances in
Complex AnalysisJournal of
Hindawiwwwhindawicom Volume 2018
OptimizationJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
Hindawiwwwhindawicom Volume 2018
Operations ResearchAdvances in
Journal of
Hindawiwwwhindawicom Volume 2018
Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018
International Journal of Mathematics and Mathematical Sciences
Hindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018Volume 2018
Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in
Nature and SocietyHindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Dierential EquationsInternational Journal of
Volume 2018
Hindawiwwwhindawicom Volume 2018
Decision SciencesAdvances in
Hindawiwwwhindawicom Volume 2018
AnalysisInternational Journal of
Hindawiwwwhindawicom Volume 2018
Stochastic AnalysisInternational Journal of
Submit your manuscripts atwwwhindawicom
Mathematical Problems in Engineering 7
3448
2346
18591978
2459
29062435
2182
0
5
10
15
20
25
30
35
40
5 10 15 20 25 30 35 40
MSE
Hidden layer neurons number
07312
08354
0880909134
08597
0785208109
08447
06
065
07
075
08
085
09
095
5 10 15 20 25 30 35 40Hidden layer neurons number
R^2
Figure 6 MSE and 1198772 under different hidden neurons
Lag
minus500
0
500
1000
1500
2000
2500
Cor
rela
tion
Autocorrelation of Error 1
CorrelationsZero CorrelationConfidence Limit
minus20 minus15 minus10 minus5 0 5 10 15 20
Figure 7 The network residual autocorrelation map when thenumber of hidden neurons is 17
model is for purpose and then get the error graph shown inFigure 8
The final result is shown in Figure 9
43 ARIMA-NARNN for ECS Forecasting ARIMA-NARNNcombination prediction ismainly completed by the following
(1) Calculating the residual sequence 119890119905 = 119910119905 minus 119871 119905(2) Using the NARNN prediction to obtain the predicted
sequence value 119873119905 of the nonlinear prediction part based onthe obtained residual sequence 119890119905
(3) Calculating the sales forecast result 119910119905 = 119871 119905 + 119873119905 ofthe ARIMA-NARNN model based on the prediction resultsof ARIMA model in 41 and the nonlinear part residualprediction values obtained in (2)
From Figure 10 only the autocorrelation coefficient ofthe error whose delay lag order is 0 exceeds 95 confidenceintervals The autocorrelation coefficients of the other ordersare within 95 confidence intervals and fluctuate around the0 value indicating that the model is reasonable and credibleAt the same time its model error is shown in Figure 11
minus100
0
100
200
300
400
500
Out
put a
nd T
arge
t
Response of Output Element 1 for Time-Series 1
20 40 60 80 100 120 140 160Time
20 40 60 80 100 120 140 160Time
minus500
0
500
Erro
r
Training TargetsTraining OutputsValidation TargetsValidation Outputs
Test TargetsTest OutputsErrorsResponse
Targets - Outputs
Figure 8 The error graph of the NARNN fitting model
The errors of NARNN are shown in Figure 11 The errorsof training set verification set and test set vary little withtime and the residuals in the previous period are close tozero In the later period although the residuals have becomebigger than before the overall error is within the acceptablerange and fluctuates around the zero value indicating that theestablished neural network model is credible and can be usedfor prediction of future residuals So based on this networkthe forecast result is shown in Figure 12
This article uses weekly sales data from January 062014 to September 19 2016 as the experimental set datafrom September 26 2016 to January 13 2017 as a test setusing the MRE and RMSE to compare the fitting error
8 Mathematical Problems in Engineering
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from NARNN
Figure 9 Actual values and predicted values from ECS-NARNN
Lag
minus400minus200
0200400600800
1000120014001600
Cor
rela
tion
Autocorrelation of Error 1
CorrelationsZero CorrelationConfidence Limit
minus20 minus15 minus10 minus5 0 5 10 15 20
Figure 10 Error correlation diagram of using NARNN to fit theresidual of ARIMA
and prediction error of ECS-ARIMA ECS-NARNN andARIMA-NARNN combined model and then evaluate thepredictive performance of each model
The predicted and actual values of the three models arecompared as shown in Figure 13
From Figure 13 the predicted value of the three modelsin the test set fits well with the real value and the predictionperformance is also good The ARIMA-NARNN model hasa higher fitting degree for predicted values and real valuesHowever the result is only for a single time series in orderto verify the universal superiority of the ARIMA-NARNNmodel the same analysis process will be performed for theother 59 time series of different e-commerce items sales Thetypes of items include food beverages household appliancesfresh food household goods baby products toys hometextiles clothing footwear etc
minus200minus150minus100minus50
050
100150200250
Out
put a
nd T
arge
t
Response of Output Element 1 for Time-Series 1
Training TargetsTraining OutputsValidation TargetsValidation Outputs
Test TargetsTest OutputsErrorsResponse
20 40 60 80 100 120 140 160Time
20 40 60 80 100 120 140 160Time
minus2000
200400
Erro
rTargets - Outputs
Figure 11 Error of using NARNN to fit the residual of ARIMA
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from ARIMA-NARNN
Figure 12 The prediction of using ARIMA-NARNN combinedmodel and actual values
44 Model Comparison and Discussion In the 60 time seriesof different e-commerce products the trend and season-ality of them are not exactly the same For different timeseries features different analysis methods (ie ARIMA orSARIMA) will be usedThe final analysis results are shown inFigure 14
It can be seen in Figure 14 that the RMSE of ARIMA-NARNN is generally lower than that of ARIMAandNARNNIn order to quantitatively compare the effects of the threemodels average of the MRE and RMSE for 60 e-commerce
Mathematical Problems in Engineering 9
Table 2 Average of the MRE and RMSE for 60 e-commerce products of fitting and prediction
Model Fitting error Prediction errorMRE RMSE MRE RMSE
ARIMA 00998 283451 01389 318082NARNN 00879 191893 01016 255668ARIMA-NARNN 00703 129549 009012 232321
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from ARIMAPrediction from NARNNPrediction from ARIMA-NARNN
Figure 13 Actual values and the predicted values from the threemodels
products of fitting and prediction was calculated by using (12)and (14) Table 2 shows the calculation results
The fitting and forecasting performance of the threemodels for Jingdongrsquos weekly sales data is shown in Table 2It can be seen that both the MRE and RMSE of the ARIMA-NARNN combined model are the lowest in model fitting andmodel prediction Therefore the ARIMA-NARNN combina-tion model is the best the ECS-NARNN is the second andthe ECS-ARIMA model is the worst
5 Conclusion
The ECS studied in this paper often has two characteristicslinearity and nonlinearity We choose the e-commerce salestime series of many single products from Jingdong Companyin China as empirical analysis data sets and forecast thetime series of weekly sales by ECS-ARIMA model Wefind that the model has good adaptability to the linearpatterns of e-commerce sales and low fitness to nonlinearpatterns which has a big local error When ECS-NARNNmodel is used to predict it is found that the model canwell realize the nonlinear mapping process However itis easy to cause underfitting and overfitting because ofpoor control of the model structure and the prediction oflinear components is not as effective as the ECS-ARIMAmodel
0 10 20 30 40 6050E-commerce product id
15
20
25
30
35
40
RMSE
ARIMANARNNARIMA-NARNN
Figure 14 RMSE of 60 time series of e-commerce products fromthe ARIMA NARNN and ARIMA-NARNNmodels
We set up the ARIMA-NARNN combined model Specif-ically we use the ECS-ARIMA model to predict linearcomponents of the time series and use the predictedresidual of the ARIMA as a nonlinear component Atlast we predict the nonlinear component by using theECS-NARNN Our case study shows that the ARIMA-NARNN outperforms the ECS-ARIMA and ECS-NARNNmodels in terms of the prediction accuracy which is welladapted to the forecasting of ECS with linear and nonlinearcharacteristics
In the actual application of EC companies the idea ofthis research can be used to forecast the sales of differenttypes of e-commerce products Depending on the salesfrequency of different types of products different forecastingdurations can be selected to use this more effective ARIMA-NARNN combined model to predict sales in a future periodof time Therefore according to this precise forecast theenterprisersquos inventory strategy and logistics strategy can bemore rationally formulated so that the entire supply chain canoperate more smoothly
Appendix
A Matlab Code
See Box 1
10 Mathematical Problems in Engineering
solved by NARNN based on matlab rawdata is a weekly sales data of chocolate of the JDCOMrawdata=dataT = tonndata(rawdatafalsefalse) lsquotrainlmrsquo is usually fastest lsquotrainbrrsquo takes longer but may be better for challenging problems lsquotrainscgrsquo uses less memory NTSTOOL falls back to this in low memory situationstrainFcn = lsquotrainbrrsquo Bayesian RegularizationfeedbackDelays = 13hiddenLayerSize = 17net = narnet(feedbackDelayshiddenLayerSize lsquoopenrsquotrainFcn)netinputprocessFcns = lsquoremoveconstantrowsrsquo lsquomapminmaxrsquo[xxiait] = preparets(netT)netdivideFcn = lsquodividerandrsquo Divide data randomlynetdivideMode = lsquotimersquo Divide up every valuenetdivideParamtrainRatio = 70100netdivideParamvalRatio = 15100netdivideParamtestRatio = 15100netperformFcn = lsquomsersquonetplotFcns = lsquoplotperformrsquo lsquoplottrainstatersquo lsquoplotresponsersquo
lsquoploterrcorrrsquo lsquoplotinerrcorrrsquo[nettr] = train(netxtxiai)y = net(xxiai)e = gsubtract(ty)performance = perform(netty)trainTargets = gmultiply(ttrtrainMask)valTargets = gmultiply(ttrvalMask)testTargets = gmultiply(ttrtestMask)trainPerformance = perform(nettrainTargetsy)valPerformance = perform(netvalTargetsy)testPerformance = perform(nettestTargetsy)view(net) Plots Uncomment these lines to enable various plotsfigure plotperform(tr)figure plottrainstate(tr)figure plotresponse(ty)figure ploterrcorr(e)figure plotinerrcorr(xe)netc = closeloop(net)[xcxicaictc] = preparets(netcT)yc = netc(xcxicaic)perfc = perform(nettcyc)[x1xioaiot] = preparets(netT)[y1xfoafo] = net(x1xioaio)[netcxicaic] = closeloop(netxfoafo)[y2xfcafc] = netc(cell(05)xicaic)nets = removedelay(net)[xsxisaists] = preparets(netsT)ys = nets(xsxisais)stepAheadPerformance = perform(nettsys)genFunction(net lsquomyNeuralNetworkFunctionrsquo)
y = myNeuralNetworkFunction(xxiai)endif (false)
genFunction(net lsquomyNeuralNetworkFunctionrsquo lsquoMatrixOnlyrsquo lsquoyesrsquo)x1 = cell2mat(x(1))xi1 = cell2mat(xi(1))y = myNeuralNetworkFunction(x1xi1)
endif (false)
gensim(net)end
Box 1
Mathematical Problems in Engineering 11
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request Seethe Appendix
Conflicts of Interest
The authors declare that they have no conflicts of interest
Acknowledgments
The study is funded by Scientific and Technological SupportProgram of the Ministry of Science and Technology ofPeoplersquos Republic of China (2014BAH23F01)
References
[1] L R Dhumne ldquoElectronic commerce a current trendrdquo Interna-tional Journal on Information Technology Management 2012
[2] X Q Zhang and S W Chen ldquoForecast of Chinas ForestationArea Based on ARIMA Modelrdquo Chinese Forestry Science ampTechnology vol 5 no 2 pp 50ndash55 2010
[3] K W Wang C Deng and J P Li ldquoHybrid methodology fortuberculosis incidence time-series forecasting based onARIMAand a NAR neural networkrdquo Epidemiology amp Infection vol 12017
[4] S Wei D Zuo and J Song ldquoImproving prediction accuracy ofriver discharge time series using aWavelet-NARartificial neuralnetworkrdquo Journal of Hydroinformatics vol 14 no 4 pp 974ndash991 2012
[5] L Yu L Zhou L Tan et al ldquoApplication of a new hybridmodel with seasonal auto-regressive integrated moving aver-age (ARIMA) and nonlinear auto-regressive neural network(NARNN) in forecasting incidence cases of HFMD in Shen-zhen Chinardquo PLoS ONE vol 9 no 6 2014
[6] T Van Calster B Baesens and W Lemahieu ldquoProfARIMA Aprofit-driven order identification algorithm for ARIMAmodelsin sales forecastingrdquo Applied So Computing vol 60 pp 775ndash785 2017
[7] P Ramos N Santos and R Rebelo ldquoPerformance of statespace andARIMAmodels for consumer retail sales forecastingrdquoRobotics and Computer-Integrated Manufacturing vol 34 pp151ndash163 2015
[8] D Wei P Geng L Ying and S Li ldquoA prediction study on e-commerce sales based on structure time series model and websearch datardquo in Proceedings of the 26th Chinese Control andDecision Conference CCDC 2014 pp 5346ndash5351 China June2014
[9] P Geng L Na and L Ben-Fu ldquoResearch on the Predictionof E-commerce Transaction Volume - Based on the PredictionModel of Search Data and Commodity Classification in Sta-tionrdquoManagement Modernization vol 2 pp 30ndash32 2014
[10] J Yu and X Le ldquoSales forecast for amazon sales based ondifferent statistics methodologiesrdquo ICEME vol 12 2016
[11] Y Miao Research on Mid - Season Sales Forecast Based onMachine Learning eory Zhejiang University of Technology2015
[12] L Ye and D D Fu ldquoExperience of He Ruoping using medicinein treating bladder tumorrdquo Journal of Zhejiang Chinese MedicineUniversity vol 39 no 1 pp 28ndash34 2015
[13] P Doganis A Alexandridis P Patrinos and H SarimveisldquoTime series sales forecasting for short shelf-life food productsbased on artificial neural networks and evolutionary comput-ingrdquo Journal of Food Engineering vol 75 no 2 pp 196ndash2042006
[14] P H Franses and R Legerstee ldquoCombining SKU-level salesforecasts from models and expertsrdquo Expert Systems with Appli-cations vol 38 no 3 pp 2365ndash2370 2011
[15] Y Weng and H Feng ldquoResearch online store sale forcast modelbased on BP neural networkrdquo Journal of Minjiang University2016
[16] P Qin and C Cheng ldquoPrediction of Seawall Settlement Basedon a Combined LS-ARIMA ModelrdquoMathematical Problems inEngineering vol 2017 Article ID 7840569 7 pages 2017
[17] Y E Shao ldquoPrediction of Currency Volume Issued in TaiwanUsing a Hybrid Artificial Neural Network andMultiple Regres-sion Approachrdquo Mathematical Problems in Engineering vol2013 Article ID 676742 9 pages 2013
[18] J Huang Y Tang and S Chen ldquoEnergy Demand ForecastingCombining Cointegration Analysis and Artificial IntelligenceAlgorithmrdquo Mathematical Problems in Engineering vol 2018Article ID 5194810 13 pages 2018
[19] J M P Menezes Jr and G A Barreto ldquoLong-term time seriesprediction with the NARX network An empirical evaluationrdquoNeurocomputing vol 71 no 16-18 pp 3335ndash3343 2008
[20] K Prabakaran C Sivapragasam C Jeevapriya and A Nar-matha ldquoForecasting Cultivated Areas And Production OfWheat In India Using ARIMA Modelrdquo Golden Researchoughts vol 3 no 3 pp 281ndash289 2013
[21] O Kaynar and S Tastan ldquoZaman serileri tahmininde arima-mlp melez modelirdquo Ataturk University Journal of EconomicsAdministrative Science 2010
[22] M Qin and Z Du Red tide time series forecasting by combiningARIMA and deep belief network Elsevier Science Publishers2017
[23] S Barak and S S Sadegh ldquoForecasting energy consumptionusing ensemble ARIMA-ANFIS hybrid algorithmrdquo Interna-tional Journal of Electrical Power amp Energy Systems vol 82 pp92ndash104 2016
[24] R Bonetto and M Rossi ldquoParallel multi-step ahead powerdemand forecasting throughNARneural networksrdquo in Proceed-ings of the 7th IEEE International Conference on Smart GridCommunications SmartGridComm 2016 pp 314ndash319 AustraliaNovember 2016
[25] M Sharafi H Ghaem H R Tabatabaee and H FaramarzildquoForecasting the number of zoonotic cutaneous leishmaniasiscases in south of Fars province Iran using seasonal ARIMAtime series methodrdquo Asian Pacific Journal of Tropical Medicinevol 10 no 1 pp 79ndash86 2017
[26] E Cadenas W Rivera R Campos-Amezcua and C HeardldquoWind speed prediction using a univariate ARIMAmodel and amultivariate NARXmodelrdquo Energies vol 9 no 2 pp 1ndash15 2016
[27] R Gamberini F Lolli B Rimini and F Sgarbossa ldquoForecastingof sporadic demand patterns with seasonality and trend com-ponents An empirical comparison between holt-winters and(s)ARIMA methodsrdquo Mathematical Problems in Engineeringvol 2010 Article ID 579010 15 pages 2010
[28] M A Rahman and L Casanovas ldquoStrategies to Predict E-Commerce Inventory and Order Planningrdquo International Jour-nal of Technology Diffusion vol 8 no 4 pp 17ndash30 2017
12 Mathematical Problems in Engineering
[29] S Li andR Li ldquoComparison of forecasting energy consumptionin Shandong China Using the ARIMA model GMmodel andARIMA-GMmodelrdquo Sustainability vol 9 no 7 2017
[30] MHAmini A Kargarian andOKarabasoglu ldquoARIMA-baseddecoupled time series forecasting of electric vehicle chargingdemand for stochastic power system operationrdquo Electric PowerSystems Research vol 140 pp 378ndash390 2016
[31] P SenM Roy andP Pal ldquoApplication ofARIMA for forecastingenergy consumption and GHG emission A case study of anIndian pig iron manufacturing organizationrdquo Energy vol 116pp 1031ndash1038 2016
Hindawiwwwhindawicom Volume 2018
MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Applied MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Probability and StatisticsHindawiwwwhindawicom Volume 2018
Journal of
Hindawiwwwhindawicom Volume 2018
Mathematical PhysicsAdvances in
Complex AnalysisJournal of
Hindawiwwwhindawicom Volume 2018
OptimizationJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
Hindawiwwwhindawicom Volume 2018
Operations ResearchAdvances in
Journal of
Hindawiwwwhindawicom Volume 2018
Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018
International Journal of Mathematics and Mathematical Sciences
Hindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018Volume 2018
Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in
Nature and SocietyHindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Dierential EquationsInternational Journal of
Volume 2018
Hindawiwwwhindawicom Volume 2018
Decision SciencesAdvances in
Hindawiwwwhindawicom Volume 2018
AnalysisInternational Journal of
Hindawiwwwhindawicom Volume 2018
Stochastic AnalysisInternational Journal of
Submit your manuscripts atwwwhindawicom
8 Mathematical Problems in Engineering
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from NARNN
Figure 9 Actual values and predicted values from ECS-NARNN
Lag
minus400minus200
0200400600800
1000120014001600
Cor
rela
tion
Autocorrelation of Error 1
CorrelationsZero CorrelationConfidence Limit
minus20 minus15 minus10 minus5 0 5 10 15 20
Figure 10 Error correlation diagram of using NARNN to fit theresidual of ARIMA
and prediction error of ECS-ARIMA ECS-NARNN andARIMA-NARNN combined model and then evaluate thepredictive performance of each model
The predicted and actual values of the three models arecompared as shown in Figure 13
From Figure 13 the predicted value of the three modelsin the test set fits well with the real value and the predictionperformance is also good The ARIMA-NARNN model hasa higher fitting degree for predicted values and real valuesHowever the result is only for a single time series in orderto verify the universal superiority of the ARIMA-NARNNmodel the same analysis process will be performed for theother 59 time series of different e-commerce items sales Thetypes of items include food beverages household appliancesfresh food household goods baby products toys hometextiles clothing footwear etc
minus200minus150minus100minus50
050
100150200250
Out
put a
nd T
arge
t
Response of Output Element 1 for Time-Series 1
Training TargetsTraining OutputsValidation TargetsValidation Outputs
Test TargetsTest OutputsErrorsResponse
20 40 60 80 100 120 140 160Time
20 40 60 80 100 120 140 160Time
minus2000
200400
Erro
rTargets - Outputs
Figure 11 Error of using NARNN to fit the residual of ARIMA
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from ARIMA-NARNN
Figure 12 The prediction of using ARIMA-NARNN combinedmodel and actual values
44 Model Comparison and Discussion In the 60 time seriesof different e-commerce products the trend and season-ality of them are not exactly the same For different timeseries features different analysis methods (ie ARIMA orSARIMA) will be usedThe final analysis results are shown inFigure 14
It can be seen in Figure 14 that the RMSE of ARIMA-NARNN is generally lower than that of ARIMAandNARNNIn order to quantitatively compare the effects of the threemodels average of the MRE and RMSE for 60 e-commerce
Mathematical Problems in Engineering 9
Table 2 Average of the MRE and RMSE for 60 e-commerce products of fitting and prediction
Model Fitting error Prediction errorMRE RMSE MRE RMSE
ARIMA 00998 283451 01389 318082NARNN 00879 191893 01016 255668ARIMA-NARNN 00703 129549 009012 232321
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from ARIMAPrediction from NARNNPrediction from ARIMA-NARNN
Figure 13 Actual values and the predicted values from the threemodels
products of fitting and prediction was calculated by using (12)and (14) Table 2 shows the calculation results
The fitting and forecasting performance of the threemodels for Jingdongrsquos weekly sales data is shown in Table 2It can be seen that both the MRE and RMSE of the ARIMA-NARNN combined model are the lowest in model fitting andmodel prediction Therefore the ARIMA-NARNN combina-tion model is the best the ECS-NARNN is the second andthe ECS-ARIMA model is the worst
5 Conclusion
The ECS studied in this paper often has two characteristicslinearity and nonlinearity We choose the e-commerce salestime series of many single products from Jingdong Companyin China as empirical analysis data sets and forecast thetime series of weekly sales by ECS-ARIMA model Wefind that the model has good adaptability to the linearpatterns of e-commerce sales and low fitness to nonlinearpatterns which has a big local error When ECS-NARNNmodel is used to predict it is found that the model canwell realize the nonlinear mapping process However itis easy to cause underfitting and overfitting because ofpoor control of the model structure and the prediction oflinear components is not as effective as the ECS-ARIMAmodel
0 10 20 30 40 6050E-commerce product id
15
20
25
30
35
40
RMSE
ARIMANARNNARIMA-NARNN
Figure 14 RMSE of 60 time series of e-commerce products fromthe ARIMA NARNN and ARIMA-NARNNmodels
We set up the ARIMA-NARNN combined model Specif-ically we use the ECS-ARIMA model to predict linearcomponents of the time series and use the predictedresidual of the ARIMA as a nonlinear component Atlast we predict the nonlinear component by using theECS-NARNN Our case study shows that the ARIMA-NARNN outperforms the ECS-ARIMA and ECS-NARNNmodels in terms of the prediction accuracy which is welladapted to the forecasting of ECS with linear and nonlinearcharacteristics
In the actual application of EC companies the idea ofthis research can be used to forecast the sales of differenttypes of e-commerce products Depending on the salesfrequency of different types of products different forecastingdurations can be selected to use this more effective ARIMA-NARNN combined model to predict sales in a future periodof time Therefore according to this precise forecast theenterprisersquos inventory strategy and logistics strategy can bemore rationally formulated so that the entire supply chain canoperate more smoothly
Appendix
A Matlab Code
See Box 1
10 Mathematical Problems in Engineering
solved by NARNN based on matlab rawdata is a weekly sales data of chocolate of the JDCOMrawdata=dataT = tonndata(rawdatafalsefalse) lsquotrainlmrsquo is usually fastest lsquotrainbrrsquo takes longer but may be better for challenging problems lsquotrainscgrsquo uses less memory NTSTOOL falls back to this in low memory situationstrainFcn = lsquotrainbrrsquo Bayesian RegularizationfeedbackDelays = 13hiddenLayerSize = 17net = narnet(feedbackDelayshiddenLayerSize lsquoopenrsquotrainFcn)netinputprocessFcns = lsquoremoveconstantrowsrsquo lsquomapminmaxrsquo[xxiait] = preparets(netT)netdivideFcn = lsquodividerandrsquo Divide data randomlynetdivideMode = lsquotimersquo Divide up every valuenetdivideParamtrainRatio = 70100netdivideParamvalRatio = 15100netdivideParamtestRatio = 15100netperformFcn = lsquomsersquonetplotFcns = lsquoplotperformrsquo lsquoplottrainstatersquo lsquoplotresponsersquo
lsquoploterrcorrrsquo lsquoplotinerrcorrrsquo[nettr] = train(netxtxiai)y = net(xxiai)e = gsubtract(ty)performance = perform(netty)trainTargets = gmultiply(ttrtrainMask)valTargets = gmultiply(ttrvalMask)testTargets = gmultiply(ttrtestMask)trainPerformance = perform(nettrainTargetsy)valPerformance = perform(netvalTargetsy)testPerformance = perform(nettestTargetsy)view(net) Plots Uncomment these lines to enable various plotsfigure plotperform(tr)figure plottrainstate(tr)figure plotresponse(ty)figure ploterrcorr(e)figure plotinerrcorr(xe)netc = closeloop(net)[xcxicaictc] = preparets(netcT)yc = netc(xcxicaic)perfc = perform(nettcyc)[x1xioaiot] = preparets(netT)[y1xfoafo] = net(x1xioaio)[netcxicaic] = closeloop(netxfoafo)[y2xfcafc] = netc(cell(05)xicaic)nets = removedelay(net)[xsxisaists] = preparets(netsT)ys = nets(xsxisais)stepAheadPerformance = perform(nettsys)genFunction(net lsquomyNeuralNetworkFunctionrsquo)
y = myNeuralNetworkFunction(xxiai)endif (false)
genFunction(net lsquomyNeuralNetworkFunctionrsquo lsquoMatrixOnlyrsquo lsquoyesrsquo)x1 = cell2mat(x(1))xi1 = cell2mat(xi(1))y = myNeuralNetworkFunction(x1xi1)
endif (false)
gensim(net)end
Box 1
Mathematical Problems in Engineering 11
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request Seethe Appendix
Conflicts of Interest
The authors declare that they have no conflicts of interest
Acknowledgments
The study is funded by Scientific and Technological SupportProgram of the Ministry of Science and Technology ofPeoplersquos Republic of China (2014BAH23F01)
References
[1] L R Dhumne ldquoElectronic commerce a current trendrdquo Interna-tional Journal on Information Technology Management 2012
[2] X Q Zhang and S W Chen ldquoForecast of Chinas ForestationArea Based on ARIMA Modelrdquo Chinese Forestry Science ampTechnology vol 5 no 2 pp 50ndash55 2010
[3] K W Wang C Deng and J P Li ldquoHybrid methodology fortuberculosis incidence time-series forecasting based onARIMAand a NAR neural networkrdquo Epidemiology amp Infection vol 12017
[4] S Wei D Zuo and J Song ldquoImproving prediction accuracy ofriver discharge time series using aWavelet-NARartificial neuralnetworkrdquo Journal of Hydroinformatics vol 14 no 4 pp 974ndash991 2012
[5] L Yu L Zhou L Tan et al ldquoApplication of a new hybridmodel with seasonal auto-regressive integrated moving aver-age (ARIMA) and nonlinear auto-regressive neural network(NARNN) in forecasting incidence cases of HFMD in Shen-zhen Chinardquo PLoS ONE vol 9 no 6 2014
[6] T Van Calster B Baesens and W Lemahieu ldquoProfARIMA Aprofit-driven order identification algorithm for ARIMAmodelsin sales forecastingrdquo Applied So Computing vol 60 pp 775ndash785 2017
[7] P Ramos N Santos and R Rebelo ldquoPerformance of statespace andARIMAmodels for consumer retail sales forecastingrdquoRobotics and Computer-Integrated Manufacturing vol 34 pp151ndash163 2015
[8] D Wei P Geng L Ying and S Li ldquoA prediction study on e-commerce sales based on structure time series model and websearch datardquo in Proceedings of the 26th Chinese Control andDecision Conference CCDC 2014 pp 5346ndash5351 China June2014
[9] P Geng L Na and L Ben-Fu ldquoResearch on the Predictionof E-commerce Transaction Volume - Based on the PredictionModel of Search Data and Commodity Classification in Sta-tionrdquoManagement Modernization vol 2 pp 30ndash32 2014
[10] J Yu and X Le ldquoSales forecast for amazon sales based ondifferent statistics methodologiesrdquo ICEME vol 12 2016
[11] Y Miao Research on Mid - Season Sales Forecast Based onMachine Learning eory Zhejiang University of Technology2015
[12] L Ye and D D Fu ldquoExperience of He Ruoping using medicinein treating bladder tumorrdquo Journal of Zhejiang Chinese MedicineUniversity vol 39 no 1 pp 28ndash34 2015
[13] P Doganis A Alexandridis P Patrinos and H SarimveisldquoTime series sales forecasting for short shelf-life food productsbased on artificial neural networks and evolutionary comput-ingrdquo Journal of Food Engineering vol 75 no 2 pp 196ndash2042006
[14] P H Franses and R Legerstee ldquoCombining SKU-level salesforecasts from models and expertsrdquo Expert Systems with Appli-cations vol 38 no 3 pp 2365ndash2370 2011
[15] Y Weng and H Feng ldquoResearch online store sale forcast modelbased on BP neural networkrdquo Journal of Minjiang University2016
[16] P Qin and C Cheng ldquoPrediction of Seawall Settlement Basedon a Combined LS-ARIMA ModelrdquoMathematical Problems inEngineering vol 2017 Article ID 7840569 7 pages 2017
[17] Y E Shao ldquoPrediction of Currency Volume Issued in TaiwanUsing a Hybrid Artificial Neural Network andMultiple Regres-sion Approachrdquo Mathematical Problems in Engineering vol2013 Article ID 676742 9 pages 2013
[18] J Huang Y Tang and S Chen ldquoEnergy Demand ForecastingCombining Cointegration Analysis and Artificial IntelligenceAlgorithmrdquo Mathematical Problems in Engineering vol 2018Article ID 5194810 13 pages 2018
[19] J M P Menezes Jr and G A Barreto ldquoLong-term time seriesprediction with the NARX network An empirical evaluationrdquoNeurocomputing vol 71 no 16-18 pp 3335ndash3343 2008
[20] K Prabakaran C Sivapragasam C Jeevapriya and A Nar-matha ldquoForecasting Cultivated Areas And Production OfWheat In India Using ARIMA Modelrdquo Golden Researchoughts vol 3 no 3 pp 281ndash289 2013
[21] O Kaynar and S Tastan ldquoZaman serileri tahmininde arima-mlp melez modelirdquo Ataturk University Journal of EconomicsAdministrative Science 2010
[22] M Qin and Z Du Red tide time series forecasting by combiningARIMA and deep belief network Elsevier Science Publishers2017
[23] S Barak and S S Sadegh ldquoForecasting energy consumptionusing ensemble ARIMA-ANFIS hybrid algorithmrdquo Interna-tional Journal of Electrical Power amp Energy Systems vol 82 pp92ndash104 2016
[24] R Bonetto and M Rossi ldquoParallel multi-step ahead powerdemand forecasting throughNARneural networksrdquo in Proceed-ings of the 7th IEEE International Conference on Smart GridCommunications SmartGridComm 2016 pp 314ndash319 AustraliaNovember 2016
[25] M Sharafi H Ghaem H R Tabatabaee and H FaramarzildquoForecasting the number of zoonotic cutaneous leishmaniasiscases in south of Fars province Iran using seasonal ARIMAtime series methodrdquo Asian Pacific Journal of Tropical Medicinevol 10 no 1 pp 79ndash86 2017
[26] E Cadenas W Rivera R Campos-Amezcua and C HeardldquoWind speed prediction using a univariate ARIMAmodel and amultivariate NARXmodelrdquo Energies vol 9 no 2 pp 1ndash15 2016
[27] R Gamberini F Lolli B Rimini and F Sgarbossa ldquoForecastingof sporadic demand patterns with seasonality and trend com-ponents An empirical comparison between holt-winters and(s)ARIMA methodsrdquo Mathematical Problems in Engineeringvol 2010 Article ID 579010 15 pages 2010
[28] M A Rahman and L Casanovas ldquoStrategies to Predict E-Commerce Inventory and Order Planningrdquo International Jour-nal of Technology Diffusion vol 8 no 4 pp 17ndash30 2017
12 Mathematical Problems in Engineering
[29] S Li andR Li ldquoComparison of forecasting energy consumptionin Shandong China Using the ARIMA model GMmodel andARIMA-GMmodelrdquo Sustainability vol 9 no 7 2017
[30] MHAmini A Kargarian andOKarabasoglu ldquoARIMA-baseddecoupled time series forecasting of electric vehicle chargingdemand for stochastic power system operationrdquo Electric PowerSystems Research vol 140 pp 378ndash390 2016
[31] P SenM Roy andP Pal ldquoApplication ofARIMA for forecastingenergy consumption and GHG emission A case study of anIndian pig iron manufacturing organizationrdquo Energy vol 116pp 1031ndash1038 2016
Hindawiwwwhindawicom Volume 2018
MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Applied MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Probability and StatisticsHindawiwwwhindawicom Volume 2018
Journal of
Hindawiwwwhindawicom Volume 2018
Mathematical PhysicsAdvances in
Complex AnalysisJournal of
Hindawiwwwhindawicom Volume 2018
OptimizationJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
Hindawiwwwhindawicom Volume 2018
Operations ResearchAdvances in
Journal of
Hindawiwwwhindawicom Volume 2018
Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018
International Journal of Mathematics and Mathematical Sciences
Hindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018Volume 2018
Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in
Nature and SocietyHindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Dierential EquationsInternational Journal of
Volume 2018
Hindawiwwwhindawicom Volume 2018
Decision SciencesAdvances in
Hindawiwwwhindawicom Volume 2018
AnalysisInternational Journal of
Hindawiwwwhindawicom Volume 2018
Stochastic AnalysisInternational Journal of
Submit your manuscripts atwwwhindawicom
Mathematical Problems in Engineering 9
Table 2 Average of the MRE and RMSE for 60 e-commerce products of fitting and prediction
Model Fitting error Prediction errorMRE RMSE MRE RMSE
ARIMA 00998 283451 01389 318082NARNN 00879 191893 01016 255668ARIMA-NARNN 00703 129549 009012 232321
0 5 10 15 20 25Week
50
100
150
200
250
300
350
400
450
500
Wee
kly
sale
s
Actual valuePrediction from ARIMAPrediction from NARNNPrediction from ARIMA-NARNN
Figure 13 Actual values and the predicted values from the threemodels
products of fitting and prediction was calculated by using (12)and (14) Table 2 shows the calculation results
The fitting and forecasting performance of the threemodels for Jingdongrsquos weekly sales data is shown in Table 2It can be seen that both the MRE and RMSE of the ARIMA-NARNN combined model are the lowest in model fitting andmodel prediction Therefore the ARIMA-NARNN combina-tion model is the best the ECS-NARNN is the second andthe ECS-ARIMA model is the worst
5 Conclusion
The ECS studied in this paper often has two characteristicslinearity and nonlinearity We choose the e-commerce salestime series of many single products from Jingdong Companyin China as empirical analysis data sets and forecast thetime series of weekly sales by ECS-ARIMA model Wefind that the model has good adaptability to the linearpatterns of e-commerce sales and low fitness to nonlinearpatterns which has a big local error When ECS-NARNNmodel is used to predict it is found that the model canwell realize the nonlinear mapping process However itis easy to cause underfitting and overfitting because ofpoor control of the model structure and the prediction oflinear components is not as effective as the ECS-ARIMAmodel
0 10 20 30 40 6050E-commerce product id
15
20
25
30
35
40
RMSE
ARIMANARNNARIMA-NARNN
Figure 14 RMSE of 60 time series of e-commerce products fromthe ARIMA NARNN and ARIMA-NARNNmodels
We set up the ARIMA-NARNN combined model Specif-ically we use the ECS-ARIMA model to predict linearcomponents of the time series and use the predictedresidual of the ARIMA as a nonlinear component Atlast we predict the nonlinear component by using theECS-NARNN Our case study shows that the ARIMA-NARNN outperforms the ECS-ARIMA and ECS-NARNNmodels in terms of the prediction accuracy which is welladapted to the forecasting of ECS with linear and nonlinearcharacteristics
In the actual application of EC companies the idea ofthis research can be used to forecast the sales of differenttypes of e-commerce products Depending on the salesfrequency of different types of products different forecastingdurations can be selected to use this more effective ARIMA-NARNN combined model to predict sales in a future periodof time Therefore according to this precise forecast theenterprisersquos inventory strategy and logistics strategy can bemore rationally formulated so that the entire supply chain canoperate more smoothly
Appendix
A Matlab Code
See Box 1
10 Mathematical Problems in Engineering
solved by NARNN based on matlab rawdata is a weekly sales data of chocolate of the JDCOMrawdata=dataT = tonndata(rawdatafalsefalse) lsquotrainlmrsquo is usually fastest lsquotrainbrrsquo takes longer but may be better for challenging problems lsquotrainscgrsquo uses less memory NTSTOOL falls back to this in low memory situationstrainFcn = lsquotrainbrrsquo Bayesian RegularizationfeedbackDelays = 13hiddenLayerSize = 17net = narnet(feedbackDelayshiddenLayerSize lsquoopenrsquotrainFcn)netinputprocessFcns = lsquoremoveconstantrowsrsquo lsquomapminmaxrsquo[xxiait] = preparets(netT)netdivideFcn = lsquodividerandrsquo Divide data randomlynetdivideMode = lsquotimersquo Divide up every valuenetdivideParamtrainRatio = 70100netdivideParamvalRatio = 15100netdivideParamtestRatio = 15100netperformFcn = lsquomsersquonetplotFcns = lsquoplotperformrsquo lsquoplottrainstatersquo lsquoplotresponsersquo
lsquoploterrcorrrsquo lsquoplotinerrcorrrsquo[nettr] = train(netxtxiai)y = net(xxiai)e = gsubtract(ty)performance = perform(netty)trainTargets = gmultiply(ttrtrainMask)valTargets = gmultiply(ttrvalMask)testTargets = gmultiply(ttrtestMask)trainPerformance = perform(nettrainTargetsy)valPerformance = perform(netvalTargetsy)testPerformance = perform(nettestTargetsy)view(net) Plots Uncomment these lines to enable various plotsfigure plotperform(tr)figure plottrainstate(tr)figure plotresponse(ty)figure ploterrcorr(e)figure plotinerrcorr(xe)netc = closeloop(net)[xcxicaictc] = preparets(netcT)yc = netc(xcxicaic)perfc = perform(nettcyc)[x1xioaiot] = preparets(netT)[y1xfoafo] = net(x1xioaio)[netcxicaic] = closeloop(netxfoafo)[y2xfcafc] = netc(cell(05)xicaic)nets = removedelay(net)[xsxisaists] = preparets(netsT)ys = nets(xsxisais)stepAheadPerformance = perform(nettsys)genFunction(net lsquomyNeuralNetworkFunctionrsquo)
y = myNeuralNetworkFunction(xxiai)endif (false)
genFunction(net lsquomyNeuralNetworkFunctionrsquo lsquoMatrixOnlyrsquo lsquoyesrsquo)x1 = cell2mat(x(1))xi1 = cell2mat(xi(1))y = myNeuralNetworkFunction(x1xi1)
endif (false)
gensim(net)end
Box 1
Mathematical Problems in Engineering 11
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request Seethe Appendix
Conflicts of Interest
The authors declare that they have no conflicts of interest
Acknowledgments
The study is funded by Scientific and Technological SupportProgram of the Ministry of Science and Technology ofPeoplersquos Republic of China (2014BAH23F01)
References
[1] L R Dhumne ldquoElectronic commerce a current trendrdquo Interna-tional Journal on Information Technology Management 2012
[2] X Q Zhang and S W Chen ldquoForecast of Chinas ForestationArea Based on ARIMA Modelrdquo Chinese Forestry Science ampTechnology vol 5 no 2 pp 50ndash55 2010
[3] K W Wang C Deng and J P Li ldquoHybrid methodology fortuberculosis incidence time-series forecasting based onARIMAand a NAR neural networkrdquo Epidemiology amp Infection vol 12017
[4] S Wei D Zuo and J Song ldquoImproving prediction accuracy ofriver discharge time series using aWavelet-NARartificial neuralnetworkrdquo Journal of Hydroinformatics vol 14 no 4 pp 974ndash991 2012
[5] L Yu L Zhou L Tan et al ldquoApplication of a new hybridmodel with seasonal auto-regressive integrated moving aver-age (ARIMA) and nonlinear auto-regressive neural network(NARNN) in forecasting incidence cases of HFMD in Shen-zhen Chinardquo PLoS ONE vol 9 no 6 2014
[6] T Van Calster B Baesens and W Lemahieu ldquoProfARIMA Aprofit-driven order identification algorithm for ARIMAmodelsin sales forecastingrdquo Applied So Computing vol 60 pp 775ndash785 2017
[7] P Ramos N Santos and R Rebelo ldquoPerformance of statespace andARIMAmodels for consumer retail sales forecastingrdquoRobotics and Computer-Integrated Manufacturing vol 34 pp151ndash163 2015
[8] D Wei P Geng L Ying and S Li ldquoA prediction study on e-commerce sales based on structure time series model and websearch datardquo in Proceedings of the 26th Chinese Control andDecision Conference CCDC 2014 pp 5346ndash5351 China June2014
[9] P Geng L Na and L Ben-Fu ldquoResearch on the Predictionof E-commerce Transaction Volume - Based on the PredictionModel of Search Data and Commodity Classification in Sta-tionrdquoManagement Modernization vol 2 pp 30ndash32 2014
[10] J Yu and X Le ldquoSales forecast for amazon sales based ondifferent statistics methodologiesrdquo ICEME vol 12 2016
[11] Y Miao Research on Mid - Season Sales Forecast Based onMachine Learning eory Zhejiang University of Technology2015
[12] L Ye and D D Fu ldquoExperience of He Ruoping using medicinein treating bladder tumorrdquo Journal of Zhejiang Chinese MedicineUniversity vol 39 no 1 pp 28ndash34 2015
[13] P Doganis A Alexandridis P Patrinos and H SarimveisldquoTime series sales forecasting for short shelf-life food productsbased on artificial neural networks and evolutionary comput-ingrdquo Journal of Food Engineering vol 75 no 2 pp 196ndash2042006
[14] P H Franses and R Legerstee ldquoCombining SKU-level salesforecasts from models and expertsrdquo Expert Systems with Appli-cations vol 38 no 3 pp 2365ndash2370 2011
[15] Y Weng and H Feng ldquoResearch online store sale forcast modelbased on BP neural networkrdquo Journal of Minjiang University2016
[16] P Qin and C Cheng ldquoPrediction of Seawall Settlement Basedon a Combined LS-ARIMA ModelrdquoMathematical Problems inEngineering vol 2017 Article ID 7840569 7 pages 2017
[17] Y E Shao ldquoPrediction of Currency Volume Issued in TaiwanUsing a Hybrid Artificial Neural Network andMultiple Regres-sion Approachrdquo Mathematical Problems in Engineering vol2013 Article ID 676742 9 pages 2013
[18] J Huang Y Tang and S Chen ldquoEnergy Demand ForecastingCombining Cointegration Analysis and Artificial IntelligenceAlgorithmrdquo Mathematical Problems in Engineering vol 2018Article ID 5194810 13 pages 2018
[19] J M P Menezes Jr and G A Barreto ldquoLong-term time seriesprediction with the NARX network An empirical evaluationrdquoNeurocomputing vol 71 no 16-18 pp 3335ndash3343 2008
[20] K Prabakaran C Sivapragasam C Jeevapriya and A Nar-matha ldquoForecasting Cultivated Areas And Production OfWheat In India Using ARIMA Modelrdquo Golden Researchoughts vol 3 no 3 pp 281ndash289 2013
[21] O Kaynar and S Tastan ldquoZaman serileri tahmininde arima-mlp melez modelirdquo Ataturk University Journal of EconomicsAdministrative Science 2010
[22] M Qin and Z Du Red tide time series forecasting by combiningARIMA and deep belief network Elsevier Science Publishers2017
[23] S Barak and S S Sadegh ldquoForecasting energy consumptionusing ensemble ARIMA-ANFIS hybrid algorithmrdquo Interna-tional Journal of Electrical Power amp Energy Systems vol 82 pp92ndash104 2016
[24] R Bonetto and M Rossi ldquoParallel multi-step ahead powerdemand forecasting throughNARneural networksrdquo in Proceed-ings of the 7th IEEE International Conference on Smart GridCommunications SmartGridComm 2016 pp 314ndash319 AustraliaNovember 2016
[25] M Sharafi H Ghaem H R Tabatabaee and H FaramarzildquoForecasting the number of zoonotic cutaneous leishmaniasiscases in south of Fars province Iran using seasonal ARIMAtime series methodrdquo Asian Pacific Journal of Tropical Medicinevol 10 no 1 pp 79ndash86 2017
[26] E Cadenas W Rivera R Campos-Amezcua and C HeardldquoWind speed prediction using a univariate ARIMAmodel and amultivariate NARXmodelrdquo Energies vol 9 no 2 pp 1ndash15 2016
[27] R Gamberini F Lolli B Rimini and F Sgarbossa ldquoForecastingof sporadic demand patterns with seasonality and trend com-ponents An empirical comparison between holt-winters and(s)ARIMA methodsrdquo Mathematical Problems in Engineeringvol 2010 Article ID 579010 15 pages 2010
[28] M A Rahman and L Casanovas ldquoStrategies to Predict E-Commerce Inventory and Order Planningrdquo International Jour-nal of Technology Diffusion vol 8 no 4 pp 17ndash30 2017
12 Mathematical Problems in Engineering
[29] S Li andR Li ldquoComparison of forecasting energy consumptionin Shandong China Using the ARIMA model GMmodel andARIMA-GMmodelrdquo Sustainability vol 9 no 7 2017
[30] MHAmini A Kargarian andOKarabasoglu ldquoARIMA-baseddecoupled time series forecasting of electric vehicle chargingdemand for stochastic power system operationrdquo Electric PowerSystems Research vol 140 pp 378ndash390 2016
[31] P SenM Roy andP Pal ldquoApplication ofARIMA for forecastingenergy consumption and GHG emission A case study of anIndian pig iron manufacturing organizationrdquo Energy vol 116pp 1031ndash1038 2016
Hindawiwwwhindawicom Volume 2018
MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Applied MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Probability and StatisticsHindawiwwwhindawicom Volume 2018
Journal of
Hindawiwwwhindawicom Volume 2018
Mathematical PhysicsAdvances in
Complex AnalysisJournal of
Hindawiwwwhindawicom Volume 2018
OptimizationJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
Hindawiwwwhindawicom Volume 2018
Operations ResearchAdvances in
Journal of
Hindawiwwwhindawicom Volume 2018
Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018
International Journal of Mathematics and Mathematical Sciences
Hindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018Volume 2018
Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in
Nature and SocietyHindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Dierential EquationsInternational Journal of
Volume 2018
Hindawiwwwhindawicom Volume 2018
Decision SciencesAdvances in
Hindawiwwwhindawicom Volume 2018
AnalysisInternational Journal of
Hindawiwwwhindawicom Volume 2018
Stochastic AnalysisInternational Journal of
Submit your manuscripts atwwwhindawicom
10 Mathematical Problems in Engineering
solved by NARNN based on matlab rawdata is a weekly sales data of chocolate of the JDCOMrawdata=dataT = tonndata(rawdatafalsefalse) lsquotrainlmrsquo is usually fastest lsquotrainbrrsquo takes longer but may be better for challenging problems lsquotrainscgrsquo uses less memory NTSTOOL falls back to this in low memory situationstrainFcn = lsquotrainbrrsquo Bayesian RegularizationfeedbackDelays = 13hiddenLayerSize = 17net = narnet(feedbackDelayshiddenLayerSize lsquoopenrsquotrainFcn)netinputprocessFcns = lsquoremoveconstantrowsrsquo lsquomapminmaxrsquo[xxiait] = preparets(netT)netdivideFcn = lsquodividerandrsquo Divide data randomlynetdivideMode = lsquotimersquo Divide up every valuenetdivideParamtrainRatio = 70100netdivideParamvalRatio = 15100netdivideParamtestRatio = 15100netperformFcn = lsquomsersquonetplotFcns = lsquoplotperformrsquo lsquoplottrainstatersquo lsquoplotresponsersquo
lsquoploterrcorrrsquo lsquoplotinerrcorrrsquo[nettr] = train(netxtxiai)y = net(xxiai)e = gsubtract(ty)performance = perform(netty)trainTargets = gmultiply(ttrtrainMask)valTargets = gmultiply(ttrvalMask)testTargets = gmultiply(ttrtestMask)trainPerformance = perform(nettrainTargetsy)valPerformance = perform(netvalTargetsy)testPerformance = perform(nettestTargetsy)view(net) Plots Uncomment these lines to enable various plotsfigure plotperform(tr)figure plottrainstate(tr)figure plotresponse(ty)figure ploterrcorr(e)figure plotinerrcorr(xe)netc = closeloop(net)[xcxicaictc] = preparets(netcT)yc = netc(xcxicaic)perfc = perform(nettcyc)[x1xioaiot] = preparets(netT)[y1xfoafo] = net(x1xioaio)[netcxicaic] = closeloop(netxfoafo)[y2xfcafc] = netc(cell(05)xicaic)nets = removedelay(net)[xsxisaists] = preparets(netsT)ys = nets(xsxisais)stepAheadPerformance = perform(nettsys)genFunction(net lsquomyNeuralNetworkFunctionrsquo)
y = myNeuralNetworkFunction(xxiai)endif (false)
genFunction(net lsquomyNeuralNetworkFunctionrsquo lsquoMatrixOnlyrsquo lsquoyesrsquo)x1 = cell2mat(x(1))xi1 = cell2mat(xi(1))y = myNeuralNetworkFunction(x1xi1)
endif (false)
gensim(net)end
Box 1
Mathematical Problems in Engineering 11
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request Seethe Appendix
Conflicts of Interest
The authors declare that they have no conflicts of interest
Acknowledgments
The study is funded by Scientific and Technological SupportProgram of the Ministry of Science and Technology ofPeoplersquos Republic of China (2014BAH23F01)
References
[1] L R Dhumne ldquoElectronic commerce a current trendrdquo Interna-tional Journal on Information Technology Management 2012
[2] X Q Zhang and S W Chen ldquoForecast of Chinas ForestationArea Based on ARIMA Modelrdquo Chinese Forestry Science ampTechnology vol 5 no 2 pp 50ndash55 2010
[3] K W Wang C Deng and J P Li ldquoHybrid methodology fortuberculosis incidence time-series forecasting based onARIMAand a NAR neural networkrdquo Epidemiology amp Infection vol 12017
[4] S Wei D Zuo and J Song ldquoImproving prediction accuracy ofriver discharge time series using aWavelet-NARartificial neuralnetworkrdquo Journal of Hydroinformatics vol 14 no 4 pp 974ndash991 2012
[5] L Yu L Zhou L Tan et al ldquoApplication of a new hybridmodel with seasonal auto-regressive integrated moving aver-age (ARIMA) and nonlinear auto-regressive neural network(NARNN) in forecasting incidence cases of HFMD in Shen-zhen Chinardquo PLoS ONE vol 9 no 6 2014
[6] T Van Calster B Baesens and W Lemahieu ldquoProfARIMA Aprofit-driven order identification algorithm for ARIMAmodelsin sales forecastingrdquo Applied So Computing vol 60 pp 775ndash785 2017
[7] P Ramos N Santos and R Rebelo ldquoPerformance of statespace andARIMAmodels for consumer retail sales forecastingrdquoRobotics and Computer-Integrated Manufacturing vol 34 pp151ndash163 2015
[8] D Wei P Geng L Ying and S Li ldquoA prediction study on e-commerce sales based on structure time series model and websearch datardquo in Proceedings of the 26th Chinese Control andDecision Conference CCDC 2014 pp 5346ndash5351 China June2014
[9] P Geng L Na and L Ben-Fu ldquoResearch on the Predictionof E-commerce Transaction Volume - Based on the PredictionModel of Search Data and Commodity Classification in Sta-tionrdquoManagement Modernization vol 2 pp 30ndash32 2014
[10] J Yu and X Le ldquoSales forecast for amazon sales based ondifferent statistics methodologiesrdquo ICEME vol 12 2016
[11] Y Miao Research on Mid - Season Sales Forecast Based onMachine Learning eory Zhejiang University of Technology2015
[12] L Ye and D D Fu ldquoExperience of He Ruoping using medicinein treating bladder tumorrdquo Journal of Zhejiang Chinese MedicineUniversity vol 39 no 1 pp 28ndash34 2015
[13] P Doganis A Alexandridis P Patrinos and H SarimveisldquoTime series sales forecasting for short shelf-life food productsbased on artificial neural networks and evolutionary comput-ingrdquo Journal of Food Engineering vol 75 no 2 pp 196ndash2042006
[14] P H Franses and R Legerstee ldquoCombining SKU-level salesforecasts from models and expertsrdquo Expert Systems with Appli-cations vol 38 no 3 pp 2365ndash2370 2011
[15] Y Weng and H Feng ldquoResearch online store sale forcast modelbased on BP neural networkrdquo Journal of Minjiang University2016
[16] P Qin and C Cheng ldquoPrediction of Seawall Settlement Basedon a Combined LS-ARIMA ModelrdquoMathematical Problems inEngineering vol 2017 Article ID 7840569 7 pages 2017
[17] Y E Shao ldquoPrediction of Currency Volume Issued in TaiwanUsing a Hybrid Artificial Neural Network andMultiple Regres-sion Approachrdquo Mathematical Problems in Engineering vol2013 Article ID 676742 9 pages 2013
[18] J Huang Y Tang and S Chen ldquoEnergy Demand ForecastingCombining Cointegration Analysis and Artificial IntelligenceAlgorithmrdquo Mathematical Problems in Engineering vol 2018Article ID 5194810 13 pages 2018
[19] J M P Menezes Jr and G A Barreto ldquoLong-term time seriesprediction with the NARX network An empirical evaluationrdquoNeurocomputing vol 71 no 16-18 pp 3335ndash3343 2008
[20] K Prabakaran C Sivapragasam C Jeevapriya and A Nar-matha ldquoForecasting Cultivated Areas And Production OfWheat In India Using ARIMA Modelrdquo Golden Researchoughts vol 3 no 3 pp 281ndash289 2013
[21] O Kaynar and S Tastan ldquoZaman serileri tahmininde arima-mlp melez modelirdquo Ataturk University Journal of EconomicsAdministrative Science 2010
[22] M Qin and Z Du Red tide time series forecasting by combiningARIMA and deep belief network Elsevier Science Publishers2017
[23] S Barak and S S Sadegh ldquoForecasting energy consumptionusing ensemble ARIMA-ANFIS hybrid algorithmrdquo Interna-tional Journal of Electrical Power amp Energy Systems vol 82 pp92ndash104 2016
[24] R Bonetto and M Rossi ldquoParallel multi-step ahead powerdemand forecasting throughNARneural networksrdquo in Proceed-ings of the 7th IEEE International Conference on Smart GridCommunications SmartGridComm 2016 pp 314ndash319 AustraliaNovember 2016
[25] M Sharafi H Ghaem H R Tabatabaee and H FaramarzildquoForecasting the number of zoonotic cutaneous leishmaniasiscases in south of Fars province Iran using seasonal ARIMAtime series methodrdquo Asian Pacific Journal of Tropical Medicinevol 10 no 1 pp 79ndash86 2017
[26] E Cadenas W Rivera R Campos-Amezcua and C HeardldquoWind speed prediction using a univariate ARIMAmodel and amultivariate NARXmodelrdquo Energies vol 9 no 2 pp 1ndash15 2016
[27] R Gamberini F Lolli B Rimini and F Sgarbossa ldquoForecastingof sporadic demand patterns with seasonality and trend com-ponents An empirical comparison between holt-winters and(s)ARIMA methodsrdquo Mathematical Problems in Engineeringvol 2010 Article ID 579010 15 pages 2010
[28] M A Rahman and L Casanovas ldquoStrategies to Predict E-Commerce Inventory and Order Planningrdquo International Jour-nal of Technology Diffusion vol 8 no 4 pp 17ndash30 2017
12 Mathematical Problems in Engineering
[29] S Li andR Li ldquoComparison of forecasting energy consumptionin Shandong China Using the ARIMA model GMmodel andARIMA-GMmodelrdquo Sustainability vol 9 no 7 2017
[30] MHAmini A Kargarian andOKarabasoglu ldquoARIMA-baseddecoupled time series forecasting of electric vehicle chargingdemand for stochastic power system operationrdquo Electric PowerSystems Research vol 140 pp 378ndash390 2016
[31] P SenM Roy andP Pal ldquoApplication ofARIMA for forecastingenergy consumption and GHG emission A case study of anIndian pig iron manufacturing organizationrdquo Energy vol 116pp 1031ndash1038 2016
Hindawiwwwhindawicom Volume 2018
MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Applied MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Probability and StatisticsHindawiwwwhindawicom Volume 2018
Journal of
Hindawiwwwhindawicom Volume 2018
Mathematical PhysicsAdvances in
Complex AnalysisJournal of
Hindawiwwwhindawicom Volume 2018
OptimizationJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
Hindawiwwwhindawicom Volume 2018
Operations ResearchAdvances in
Journal of
Hindawiwwwhindawicom Volume 2018
Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018
International Journal of Mathematics and Mathematical Sciences
Hindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018Volume 2018
Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in
Nature and SocietyHindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Dierential EquationsInternational Journal of
Volume 2018
Hindawiwwwhindawicom Volume 2018
Decision SciencesAdvances in
Hindawiwwwhindawicom Volume 2018
AnalysisInternational Journal of
Hindawiwwwhindawicom Volume 2018
Stochastic AnalysisInternational Journal of
Submit your manuscripts atwwwhindawicom
Mathematical Problems in Engineering 11
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request Seethe Appendix
Conflicts of Interest
The authors declare that they have no conflicts of interest
Acknowledgments
The study is funded by Scientific and Technological SupportProgram of the Ministry of Science and Technology ofPeoplersquos Republic of China (2014BAH23F01)
References
[1] L R Dhumne ldquoElectronic commerce a current trendrdquo Interna-tional Journal on Information Technology Management 2012
[2] X Q Zhang and S W Chen ldquoForecast of Chinas ForestationArea Based on ARIMA Modelrdquo Chinese Forestry Science ampTechnology vol 5 no 2 pp 50ndash55 2010
[3] K W Wang C Deng and J P Li ldquoHybrid methodology fortuberculosis incidence time-series forecasting based onARIMAand a NAR neural networkrdquo Epidemiology amp Infection vol 12017
[4] S Wei D Zuo and J Song ldquoImproving prediction accuracy ofriver discharge time series using aWavelet-NARartificial neuralnetworkrdquo Journal of Hydroinformatics vol 14 no 4 pp 974ndash991 2012
[5] L Yu L Zhou L Tan et al ldquoApplication of a new hybridmodel with seasonal auto-regressive integrated moving aver-age (ARIMA) and nonlinear auto-regressive neural network(NARNN) in forecasting incidence cases of HFMD in Shen-zhen Chinardquo PLoS ONE vol 9 no 6 2014
[6] T Van Calster B Baesens and W Lemahieu ldquoProfARIMA Aprofit-driven order identification algorithm for ARIMAmodelsin sales forecastingrdquo Applied So Computing vol 60 pp 775ndash785 2017
[7] P Ramos N Santos and R Rebelo ldquoPerformance of statespace andARIMAmodels for consumer retail sales forecastingrdquoRobotics and Computer-Integrated Manufacturing vol 34 pp151ndash163 2015
[8] D Wei P Geng L Ying and S Li ldquoA prediction study on e-commerce sales based on structure time series model and websearch datardquo in Proceedings of the 26th Chinese Control andDecision Conference CCDC 2014 pp 5346ndash5351 China June2014
[9] P Geng L Na and L Ben-Fu ldquoResearch on the Predictionof E-commerce Transaction Volume - Based on the PredictionModel of Search Data and Commodity Classification in Sta-tionrdquoManagement Modernization vol 2 pp 30ndash32 2014
[10] J Yu and X Le ldquoSales forecast for amazon sales based ondifferent statistics methodologiesrdquo ICEME vol 12 2016
[11] Y Miao Research on Mid - Season Sales Forecast Based onMachine Learning eory Zhejiang University of Technology2015
[12] L Ye and D D Fu ldquoExperience of He Ruoping using medicinein treating bladder tumorrdquo Journal of Zhejiang Chinese MedicineUniversity vol 39 no 1 pp 28ndash34 2015
[13] P Doganis A Alexandridis P Patrinos and H SarimveisldquoTime series sales forecasting for short shelf-life food productsbased on artificial neural networks and evolutionary comput-ingrdquo Journal of Food Engineering vol 75 no 2 pp 196ndash2042006
[14] P H Franses and R Legerstee ldquoCombining SKU-level salesforecasts from models and expertsrdquo Expert Systems with Appli-cations vol 38 no 3 pp 2365ndash2370 2011
[15] Y Weng and H Feng ldquoResearch online store sale forcast modelbased on BP neural networkrdquo Journal of Minjiang University2016
[16] P Qin and C Cheng ldquoPrediction of Seawall Settlement Basedon a Combined LS-ARIMA ModelrdquoMathematical Problems inEngineering vol 2017 Article ID 7840569 7 pages 2017
[17] Y E Shao ldquoPrediction of Currency Volume Issued in TaiwanUsing a Hybrid Artificial Neural Network andMultiple Regres-sion Approachrdquo Mathematical Problems in Engineering vol2013 Article ID 676742 9 pages 2013
[18] J Huang Y Tang and S Chen ldquoEnergy Demand ForecastingCombining Cointegration Analysis and Artificial IntelligenceAlgorithmrdquo Mathematical Problems in Engineering vol 2018Article ID 5194810 13 pages 2018
[19] J M P Menezes Jr and G A Barreto ldquoLong-term time seriesprediction with the NARX network An empirical evaluationrdquoNeurocomputing vol 71 no 16-18 pp 3335ndash3343 2008
[20] K Prabakaran C Sivapragasam C Jeevapriya and A Nar-matha ldquoForecasting Cultivated Areas And Production OfWheat In India Using ARIMA Modelrdquo Golden Researchoughts vol 3 no 3 pp 281ndash289 2013
[21] O Kaynar and S Tastan ldquoZaman serileri tahmininde arima-mlp melez modelirdquo Ataturk University Journal of EconomicsAdministrative Science 2010
[22] M Qin and Z Du Red tide time series forecasting by combiningARIMA and deep belief network Elsevier Science Publishers2017
[23] S Barak and S S Sadegh ldquoForecasting energy consumptionusing ensemble ARIMA-ANFIS hybrid algorithmrdquo Interna-tional Journal of Electrical Power amp Energy Systems vol 82 pp92ndash104 2016
[24] R Bonetto and M Rossi ldquoParallel multi-step ahead powerdemand forecasting throughNARneural networksrdquo in Proceed-ings of the 7th IEEE International Conference on Smart GridCommunications SmartGridComm 2016 pp 314ndash319 AustraliaNovember 2016
[25] M Sharafi H Ghaem H R Tabatabaee and H FaramarzildquoForecasting the number of zoonotic cutaneous leishmaniasiscases in south of Fars province Iran using seasonal ARIMAtime series methodrdquo Asian Pacific Journal of Tropical Medicinevol 10 no 1 pp 79ndash86 2017
[26] E Cadenas W Rivera R Campos-Amezcua and C HeardldquoWind speed prediction using a univariate ARIMAmodel and amultivariate NARXmodelrdquo Energies vol 9 no 2 pp 1ndash15 2016
[27] R Gamberini F Lolli B Rimini and F Sgarbossa ldquoForecastingof sporadic demand patterns with seasonality and trend com-ponents An empirical comparison between holt-winters and(s)ARIMA methodsrdquo Mathematical Problems in Engineeringvol 2010 Article ID 579010 15 pages 2010
[28] M A Rahman and L Casanovas ldquoStrategies to Predict E-Commerce Inventory and Order Planningrdquo International Jour-nal of Technology Diffusion vol 8 no 4 pp 17ndash30 2017
12 Mathematical Problems in Engineering
[29] S Li andR Li ldquoComparison of forecasting energy consumptionin Shandong China Using the ARIMA model GMmodel andARIMA-GMmodelrdquo Sustainability vol 9 no 7 2017
[30] MHAmini A Kargarian andOKarabasoglu ldquoARIMA-baseddecoupled time series forecasting of electric vehicle chargingdemand for stochastic power system operationrdquo Electric PowerSystems Research vol 140 pp 378ndash390 2016
[31] P SenM Roy andP Pal ldquoApplication ofARIMA for forecastingenergy consumption and GHG emission A case study of anIndian pig iron manufacturing organizationrdquo Energy vol 116pp 1031ndash1038 2016
Hindawiwwwhindawicom Volume 2018
MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Applied MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Probability and StatisticsHindawiwwwhindawicom Volume 2018
Journal of
Hindawiwwwhindawicom Volume 2018
Mathematical PhysicsAdvances in
Complex AnalysisJournal of
Hindawiwwwhindawicom Volume 2018
OptimizationJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
Hindawiwwwhindawicom Volume 2018
Operations ResearchAdvances in
Journal of
Hindawiwwwhindawicom Volume 2018
Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018
International Journal of Mathematics and Mathematical Sciences
Hindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018Volume 2018
Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in
Nature and SocietyHindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Dierential EquationsInternational Journal of
Volume 2018
Hindawiwwwhindawicom Volume 2018
Decision SciencesAdvances in
Hindawiwwwhindawicom Volume 2018
AnalysisInternational Journal of
Hindawiwwwhindawicom Volume 2018
Stochastic AnalysisInternational Journal of
Submit your manuscripts atwwwhindawicom
12 Mathematical Problems in Engineering
[29] S Li andR Li ldquoComparison of forecasting energy consumptionin Shandong China Using the ARIMA model GMmodel andARIMA-GMmodelrdquo Sustainability vol 9 no 7 2017
[30] MHAmini A Kargarian andOKarabasoglu ldquoARIMA-baseddecoupled time series forecasting of electric vehicle chargingdemand for stochastic power system operationrdquo Electric PowerSystems Research vol 140 pp 378ndash390 2016
[31] P SenM Roy andP Pal ldquoApplication ofARIMA for forecastingenergy consumption and GHG emission A case study of anIndian pig iron manufacturing organizationrdquo Energy vol 116pp 1031ndash1038 2016
Hindawiwwwhindawicom Volume 2018
MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Applied MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Probability and StatisticsHindawiwwwhindawicom Volume 2018
Journal of
Hindawiwwwhindawicom Volume 2018
Mathematical PhysicsAdvances in
Complex AnalysisJournal of
Hindawiwwwhindawicom Volume 2018
OptimizationJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
Hindawiwwwhindawicom Volume 2018
Operations ResearchAdvances in
Journal of
Hindawiwwwhindawicom Volume 2018
Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018
International Journal of Mathematics and Mathematical Sciences
Hindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018Volume 2018
Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in
Nature and SocietyHindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Dierential EquationsInternational Journal of
Volume 2018
Hindawiwwwhindawicom Volume 2018
Decision SciencesAdvances in
Hindawiwwwhindawicom Volume 2018
AnalysisInternational Journal of
Hindawiwwwhindawicom Volume 2018
Stochastic AnalysisInternational Journal of
Submit your manuscripts atwwwhindawicom
Hindawiwwwhindawicom Volume 2018
MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Applied MathematicsJournal of
Hindawiwwwhindawicom Volume 2018
Probability and StatisticsHindawiwwwhindawicom Volume 2018
Journal of
Hindawiwwwhindawicom Volume 2018
Mathematical PhysicsAdvances in
Complex AnalysisJournal of
Hindawiwwwhindawicom Volume 2018
OptimizationJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
Hindawiwwwhindawicom Volume 2018
Operations ResearchAdvances in
Journal of
Hindawiwwwhindawicom Volume 2018
Function SpacesAbstract and Applied AnalysisHindawiwwwhindawicom Volume 2018
International Journal of Mathematics and Mathematical Sciences
Hindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018Volume 2018
Numerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisNumerical AnalysisAdvances inAdvances in Discrete Dynamics in
Nature and SocietyHindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Dierential EquationsInternational Journal of
Volume 2018
Hindawiwwwhindawicom Volume 2018
Decision SciencesAdvances in
Hindawiwwwhindawicom Volume 2018
AnalysisInternational Journal of
Hindawiwwwhindawicom Volume 2018
Stochastic AnalysisInternational Journal of
Submit your manuscripts atwwwhindawicom