0% found this document useful (0 votes)
63 views

The Realization of A Type of Supermarket Sales Forecast Model & System

Demand forecasting in the presence of systematic events: Cases in capturing sales promotions

Uploaded by

Anoop Dixit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views

The Realization of A Type of Supermarket Sales Forecast Model & System

Demand forecasting in the presence of systematic events: Cases in capturing sales promotions

Uploaded by

Anoop Dixit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

International Conference on Software Engineering and Computer Science (ICSECS2013)

The Realization of a Type of Supermarket Sales Forecast Model & System

Fen Cai YanMin Luo


College of Mathematics and Computer Science College of Computer Science and Technology
Quanzhou Normal University Huaqiao University
Quanzhou, China Xiamen, China
e-mail: [email protected] e-mail: [email protected]

Abstract—This essay solves the problem of supermarket sales of all possible sales series model of numerous commodity
forecast. In allusion to that the forecast targets are numerous, objects, a specific forecast method can not produce good
as well as the features of high volatility and having evident results always. The solution is to use combination of forecast
seasonality of the forecast series, the system adopts combined methods, i.e. to set up a library of forecast methods, having
forecast method, and designs a kind of forecast method several forecast methods included in the library, and to select
selecting algorithm integrating bagging approach and and empower the methods. Presently, research of combined
significance statistics checking approach. The system is forecast focuses on the matter of empowerment [4-5]. [6]
realized and through testing, it is able to make effective proposes a Forecast Method Selection Model with Personnel
forecast on most of the forecast targets.
Selection Approach as its basic theory. While [7] proposes a
Keywords-sales forecast; decision-making support; data
forecast model based on Linear Regression and Exponential
mining; ensemble method Smoothing. None of these models are suitable to be applied
to the sales data of supermarket. This essay puts suitable
methods in the library of forecast methods and designs a
I. INTRODUCTION selection algorithm of forecast methods integrating Bagging
The research group has developed a supermarket sales Theory and Statistical Testing Method according to the
forecast system based on data mining technology and characteristics of commodity data in supermarket. In allusion
statistical analysis method to help enterprise managers to the forecast series, the forecast model or combination of
rationally adjust the structure of commodities and make models with best performances will be found through this
decisions on purchase, sales, inventory and promotion. Both algorithm. And then the forecast and error estimation will be
the demands and experimental data of this research subject made according to the model.
come from a big chain supermarket located in Quanzhou
City, Fujian Province. II. SUPERMARKET SALES FORECAST MODEL
The forecast of sales is a matter of time series forecast.
There are many methods can be used in time series forecast. A. The Forecast Methods in the Library
The main forecast methods for stationary series are Moving With regards to the forecast of commodities sales volume,
Average Approach and Simple Exponential Smoothing which methods are more suitable? What kind of method
Approach, while to forecast the linear trend, the classical A should be used in the forecast of time series depends on the
Linear Regression or Holt’s model can be used. With regards pattern of data. Whether the data is stationary or non-
to the forecasting of non-linear trend regression, Polynomial stationary, and whether the data includes trend, seasonal or
Regression and Exponential curve model can be used. If the circulating factors? The scale of historical data, and the
series include seasonal elements, then Winter’s model or forecast period required by the Demands all have impacts on
Multiple Regression Predicting Method with seasonal the selection of forecast method. Through study, the time
dummy viable can be tried. As to series including multiple series of commodities sales have the following
factors, it would be more appropriate to choose characteristics:
Decomposing Prediction and ARIMA model. Besides, there 1) Most of the sales series have obvious seasonal or
are Grey Prediction model, Neural Network and Hybrid cyclical variation. Therefore, it would be better for the
Neural Network etc. [1-3] In case of a specific forecasting selected method to have the ability of separating seasonal
object, deep discussion can be made to find out the most factors.
appropriate forecast method or combination of methods, so
2) Generally the volatility of series is relatively high.
that the forecasting value and the observed value would have
the best goodness-of-fit. In this system, the forecasting The commodities sales fluctuate significantly; generally it
objects are being chosen and typed in by the user. Different would not be a smooth curve, but an irregular zigzag form.
commodity, different category and even different commodity Therefore, Easy Exponential Curve and A linear regression
of same category in the supermarket have different data are not suitable for the forecast of commodities sales
pattern. And the data pattern can be different as the length of volume.
selling period differs. The test results show that, in the face

© 2013. The authors - Published by Atlantis Press 219


3) The system retains all data from the year 2008 up to
now. The scale of data fulfils the requirements for at least 4 Algorithm :Selection Algorithm
periods as requested by Winter’s model, Multiple Input:
Regression with Seasonal Dummy Variable, Decomposing  X:given data series
Prediction and ARIMA Model etc.  R2: threshold value
4) The Demand requires for the forecast of at least 3  Forecast methods in the library
post-stage data. So, neither Moving Average nor Easy  Test of Significance Approach
Exponential Smoothing is appropriate, because their Output:
forecast period are relatively short.  X’: forecast value
According to the above-mentioned characteristics of  M: The selected model or combination
series, the system attempts to bring Decomposing Prediction,  Err(M):forecast error
Winter’s model and ARIMA(p,d,q)(P,D,Q)s model Procedure:
(autoregressive integrated moving averages) into the library BEGIN
of forecast methods. All the three methods have the ability of (1) Adopt the approach of truncation, dividing X into
separating seasonal factors, and have at least mid-term training set D and testing set T;
forecast period. Besides, the data scale meets the three //The first round of selection
methods’ requirements for data scales. The library of (2) m:=0 ;
forecast methods also includes linear regression, Holt (3) For i=1 to l do //for all methods in the library
Exponential Smoothing and Multi-stage Curve, because (4) Using training set D to train the model Mi ;
when the Decomposing Prediction decomposes the series (5) If R2( Mi )>R2
into error component, seasonal component and trend and (6) Then
cycle component, these three methods would be applied in (7) Mi is kept;
the modeling of abstracted trend and cycle component. At (8)m:=m+1;
the meantime, attempts are being made in the modeling of (9) Endif
trend and cycle component using ARIMA model without (10)Endfor
seasonal factors. //The second round of selection
(11) Mmin:=M1 ;
B. The Selection Algorithm Design (12) For j=1 to do
Firstly, the system adopts the approach of truncation to (13) Compute RMSE( Mj );
get 95% of the data series as the training set, leaving the (14) If RMSE( Mj )<RMSE( Mmin )
remaining 5% to be used for the assessment of model. It tries (15) Then Mmin :=Mj ;
every method in the library of forecast methods, using (16) Endif
threshold value R2 to conduct the first round of selection. The (17) Endfor
model fulfilling the set threshold value will be kept back. (18) n:=m ;
The model with slightest root-mean-square error will be (19) For j=1 to do
picked out from the remaining method ensemble, assuming (20) If Mj is significant difference against Mmin
to be Mmin, the other model will then going through statistical (21)Then Mj is sifted out;
significance check with Mmin one by one, this is the second (22) n:=n-1;
round of selection. Eventually, the non-statistical (23) Endif
significance model against Mmin, together with Mmin is the (24) Endfor
model ensemble with best performance. The retaining model (25) Using every model in M to carry out forecast on
and Mmin together will conduct forecast on the original data X, get the forecast value Xj’;
series, and conduct error calculation for the truncated data. (26) Using every model in M to carry out error
The forecast average and error average will be exported as computation on T, get the RMSE err(Mj) ;
the final conclusion. The model ensemble, together with (27) Output X’=avg( Xj’) ;
model parameter and error value will all be saved into the //the average value of each forecast value will be
model database, and being used in the forecast of same given as the final output
forecast object within short time. (28) Output forecast error err(M)=avg(err(Mj)) ;
The algorithm summarizing of forecast method selection //and the error of final output is the average value of
is described as follow: each error
What worth further explanation in the algorithm are: (29) Output the adopted model or combination of
1) The training set obtained using the approach of models M
truncation. END
The general practice for model error estimation is
dividing the dataset into training set and testing set by continuous series set without time breakpoint can be used as
sampling, using training set to train the model, and using training set for the study of model. The system adopts the
testing set for error estimation. However, sampling is not approach of truncation, dividing the whole sample zone into
suitable for the testing of time series model because only front part and later part. The front part is used as training set

220
for the study of model, while the later part is used as testing III. THE ANALYSIS AND REALIZATION OF THE SALES
set for the assessing the model and providing error value of FORECAST SYSTEM
the assessment. To ensure enough sample for the study of
model, the system cut out 5% of the data as testing set. A. System Architecture
2) Increasing the accuracy of forecast by using the The system architecture drawing of the sales forecast
approach of bagging [8]. system is shown as Fig. 1:
Through the first round of selection, theoretically, the
model with smallest error value will be chosen for the Data
Data Data Data Cache
forecast of given sample data, and the final forecast value Imaged ETL Warehouse
will be obtained. Yet the testing proves that, if two or more
than two models both perform good, then it would be better Library of
MS DSO
for every model to participate in the forecast of given sample Forecast methods
data, and take the average value of these forecast values as
The study, testing Data
the final result of the final forecast return value. This and use of model Cube
XMLA
approach is bagging of ensemble method, usually being used Library of (Application)
Models
to increase the accuracy of predictor and classifier.
Results
Then, how to identify the model with good performance? Forecast
Among the remaining models after the first round of Objects

selection, the algorithm first choose the model with smallest


root-mean-square error, and all other models will conduct
statistical significance check with it one by one. workstation

In the fitting models, suppose there are k series spots, Figure 1. System architecture of the Sales forecast system.
then the error of every series spot can be taken as different
independent sample in probability distribution, and generally The procedures are described as follow:
it follows the pattern of distribution t with k-1 degree 1) All heterogeneous data will be completely imaged in
freedom, in which, k equals to the number of series spots. the data caching zone.
Conducting presumption testing t-test, suppose the testing is In order not to cause overdue burden to the
passed, then these two models is “identical”, or the error rate supermarket’s operation database, the setting up of data
of the average value of the two is “zero”. If this presumption caching zone is quite necessary. The caching zone stores
is declined, it shows that the difference of these two models blank database. All sheet structure and data are established
is statistical significant, i.e. they have differences, and then and imported by the data abstracting program, totally
the model with higher error rate will be sifted out. And every identical with all kinds of heterogeneous data. The extracting
non-statistical significant model will be retained. Then the of data adopts the approach of full flow extracting, and it is
corresponding forecast values can all be regarded as inputs realized through auto extracting program, while the
of bagging algorithm for increasing the accuracy of the extracting frequency can be set manually, either daily,
forecast. weekly or other value is acceptable.
To forecast the same data series using M1 and M2 2) The establishment of data warehouse.
respectively, the statistics of the significance testing t of the Through the combining and summarizing, computing
error shall be calculated according to the following formula: viewing, integrity check as well as cleaning and loading of
the caching data, the data warehouse SALES is established.
 err ( M 1)  err ( M 2)   The data warehouse includes data sheet with preset structure.
t
var( M 1  M 2) / k 3) Setting up data cube.
The data in the data warehouse will be gathered as data
In this formula, err ( M 1) is the average value of M1 cube saved in the server of Analysis Services. The star data
cube being set up based on the sales forecast model is shown
model’s error, err (M 2) is the average value of M2 model’s below as Fig. 2:
error, and var(M1-M2) is the variance of the two models’
difference:


 [err (M 1)i  err (M 2)i  (err(M 1)  err(M 2))]2 
1 k
var(M 1  M 2) 
k i 1
  

Significance Level Sig is chosen to conduct presumption


testing for the retained 5%.

221
time sales Year Sales Vol.
time_key branch
time_key
day 2013 587 605 412
branch_key branch_key
day_of_the_week item_key branch_name Having cut off the last three data as training set and
month dollars_sold substituted the three prediction methods, the most optimized
quarter promotion_key model as well as the model error of each method provided by
item the system is listed as below:
year
item_key
promotion_key item_name TABLE II. MODELS AND MODEL FITTING OF TESTING 1
promotion_key category
Model RMS
subcategory Model Description R2
promotion_name No. E
protion_type
M1 Winter’s model 0.67 614.6
Figure 2. Sales Star Seasonal Decomposition
M2 0.55 445.98
+ARIMA(2,2,1)
4) The study, testing and use of forecast model. M3 ARIMA(1,2,1)(1,1,2)12 0.6 784.18
The forecast algorithm as introduced in Sec. 2 shall be Generally, if the forecast model is desirable, then the
used for the train and forecast of model with regard to the forecast value must be referential, and the model’s goodness-
forecast object as chosen by the client, returning the forecast of-fit R2 should be no less than 0.5. Therefore, suggest the
value and forecast curve to assist the manager in decision- threshold value R2 is set to be 0.5, then after the first round of
making. Other model parameters, including the model and selection, M1, M2 and M3 will all be retained. Among the
the error value will all be saved in the model database, and three, M2 has the smallest RMSE, thus M1 and M3 will carry
being applied in the forecast of same commodity in the out statistical significance testing against M2 respectively.
future, or being used for reference in the forecast of other Through the testing between M1 and M2, we can find out the
commodity of the same niche. statistical volume t=0.867<z=sig/2=0.025’s tabular value
B. System Developing Platform 2.005, which shows there is no difference of statistical
significance between M1 and M2, that the difference between
The system uses MS SQL Server as the server of date- them is stochastic. So M1 is retained. Through the testing
caching zone and data warehouse, and uses Analysis between M3 and M2, we can find out the statistical volume
Services as the data cube server. Both server and client t=0.25>z=sig/2=0.025’s tabular value 2.005, which shows
program use .Net structure, and were written in C# language. there is difference of statistical significance between M3 and
DSO (Microsoft Decision Support Object) module was M2, that the difference between them is stochastic. So M3 is
introduced in the C# language. Through the use of this sifted out.
module, data cube can be set up in Analysis Services. The The calculation of error based on the testing set is given
system uses XMLA (Microsoft XML for Analysis) to realize as below:
the barrier free interaction of multi-dimension data set and
mining program in Analysis Services. TABLE III. ERROR ESTIMATION OF TESTING 1
IV. ANALYSIS WITH EXAMPLE AND TESTING OF
Observe Value Forecast Value of M1 Forecast Value of M2
ALGORITHM EFFECTIVENESS
587 614 642
A. Testing 1
The existing data of monthly sales of “Darlie Toothpaste 605 620 697
225G”after promotion reduction at some outlet is listed as 412 332 363
below:
The Output Error is :
TABLE I. MONTHLY SALES OF “DARLIE TOOTHPASTE 225G”
RMSE=(RMSE(M1)+RMSE(M2))/2=(49.5+55.1)/2=52.3
The forecast value is given as below:
Year Sales Vol.
TABLE IV. FORECAST VALUES OF TESTING 1
2008 569 585 552 362 439 965 1330 1387 830 369 976 1505
Time Model M1’s output Model M2’s output Final output
2009 2419 240 472 567 579 1183 1512 1669 809 583 359 322
2013-04 240 208 224
2010 1177 2352 927 259 242 353 262 274 304 127 162 235
2013-05 98 158 128
2011 382 599 356 332 270 264 861 1432 1361 658 874 278
2013-06 347 109 253
2012 357 1155 1185 781 346 297 451 355 394 383 235 198

222
B. Testing 2 TABLE VIII. FORECAST VALUES OF TESTING 2

The existing data of monthly sales of “Tsingtao Beer


Time Model M1’s output
with 11% alcoholic strength thick can 330ml”after
promotion reduction at some outlet is listed as below: 2013-04 233
TABLE V. MONTHLY SALES OF “TSINGTAO BEER WITH 11% 2013-05 184
ALCOHOLIC STRENGTH THICK CAN 330ML”
2013-06 138
Year Sales Vol.
C. Conclusion of Testing
931 856 923 1349 2165 2542 2470 1607 1887 1333 1181 The errors of both testing with examples are kept within a
2008
833
1170 1052 1083 1426 1482 1127 4519 2576 4595 2828
small scope. And from the result of analysis we can also see
2009 that, different testing object fits for different forecast method.
1882 1788
2647 2052 1600 2649 2705 1643 4080 2536 2518 731 666 And in fact, a lot of testing also suggest that, with regard to
2010
669 different forecast objects, it is not applicable to use a fixed
2011 717 2234 531 671 829 810 1076 723 1093 1444 688 605 forecast method. Therefore, it is more intelligent and having
more expansibility for the system to set up a library of
2012 1536 654 1048 1743 819 1379 768 969 546 493 280 212
forecast methods, and to choose different forecast method
2013 306 212 314 according to different forecast situation.
Having cut off the last three data as training set and V. CONCLUSION
substituted the three prediction methods, the most optimized
model as well as the model error of each method provided by Developing supermarket commodity sales volume
the system is listed as below: forecast system with a library of forecast methods being set
up, selecting the model or model group with the best
TABLE VI. MODELS AND MODEL FITTING OF TESTING 2 goodness of fit, and the approach of bagging is adopted to
further increase the accuracy of the forecast model. Through
Model testing, the system can forecast the commodity sales volume
Model Description R2 RMSE
No. in nearest 2-3 phases with relatively good result. The key
M1 Winter’s model 0.544 751.88 works for next step is trying to add other methods to the
database of testing methods, to measure the data mining
M2 Seasonal Decomposition +ARIMA(1,2,0) 0.962 132.6
period in terms of time, and to test the validity of mining
M3 ARIMA(1,2,1)(1,1,2) 12
0.412 943.48 algorithm as the category of testing objects further increases.
Likewise, suggest the threshold value R2 is set to be 0.5, ACKNOWLEDGMENT
then after the first round of selection, M3 will be sifted out.
Among the remaining models, M1 and M2, M2 has the smaller This work was supported by the department of education
RMSE, thus M1 will carry out statistical significance testing projects of Fujian(JA10240).
against M2, and through the testing we can find out the
REFERENCES
statistical volume t=6.91>z=sig/2=0.025’s tabular value
2.005, which shows there is difference of statistical [1] Jaya, M., and K. Sundar. “Forecasting of market capitalization
through arima (with special reference to Indian information
significance between M1 and M2, that the difference between technology firms),” Asian Journal of Research in Business Economics
them is not stochastic. So there is only M2 being retained in and Management, Vol. 2, No.10, 2012, PP.1-21.
testing 2. [2] Luo, B., W-W. Yan, and L. Wan. “Application of Time-series
The calculation of error based on the testing set is given Decomposition with Dummy Variables to Cigarette Sales Forecast.”
as below: Jisuanji Xitong Yingyong- Computer Systems and Applications,Vol.
21,No.12,2012.
TABLE VII. ERROR ESTIMATION OF TESTING 2 [3] Pan, Youqin, Terrance Pohlen, and Saverio Manago. “Hybrid Neural
Network Model in Forecasting Aggregate US Retail Sales.” Advances
in Business and Management Forecasting,No. 9,2013,pp. 153-170.
Observe Value Forecast Value
[4] Jiang, Guorui, and Ying Liu.”Research on Collaborative Forecasting
Model Based on CPFR.” Software Engineering and Knowledge
306 324.56 Engineering: Theory and Practice. Springer Berlin Heidelberg, 2012,
pp. 523-529.
212 233.97
[5] Menezes L M d, Bunn D W. “Review of guidelines for the use of
314 182.32 combined forecasts.”European J of Operational Research,Vol. 120,No.
1 ,2000.
The Output Error is :
[6] GuangYu Zhu, HongSen Yan, “A combination forecasting method
RMSE=77.8 based on model evaluation and selection from forecasting-model-
The forecast value is given as below: base.”Control and Decision, Vol. 19, No. 7, 2004.
[7] Cheng Xu, Hongsen Yan, Qing Huang, “Design and Development of
Sales Forecasting System Based on Module Technique on .NET

223
Paltform.”Chinese Journal of Computer Technology and [8] Hillebrand, Eric, and Marcelo C. Medeiros. “The benefits of bagging
Development, Vol 17, No. 2, Feb. 2007, pp. 27-30. for forecast models of realized volatility.” Econometric Reviews Vol.
29,No. 5,2010,PP. 571-593.

224

You might also like