Docstoc

A Fuzzy Forecasting Model for Apparel Sales

Document Sample
A Fuzzy Forecasting Model for Apparel Sales Powered By Docstoc
					                                                   I01-P10
                                                      1

A Fuzzy Forecasting Model for Apparel Sales
Celia Frank (PI)       Philadelphia University, Philadelphia
Amar Raheja            California State Polytechnic University, Pomona
Les Sztandera          Philadelphia University, Philadelphia
Ashish Garg            Philadelphia University, Philadelphia

Project Website:       http://vega.philau.edu/~ntc

GOAL
The goal of this research is to develop a fuzzy forecasting model for apparel sales.

OBJECTIVE
Forecasting sales is a challenging task because many endogenous as well as exogenous variables
such as size, price, color, climatic data, effect of media, etc. are involved. In our research, we are
trying to primarily forecast apparel sales in the absence of most of the above mentioned factors
and then use fuzzy logic principles to incorporate the various parameters that affect the sales.
The forecasting model will investigate the use of both statistical models such as ARIMA, Box-
Jenkins etc. and non-statistical approaches such as neural networks, genetic algorithms, and
fuzzy-logic.

ABSTRACT
We are investigating two different approaches of forecasting such as statistical and quantitative
(using neural networks, genetic algorithms). Sales data from the past three years (1997 – 1999)
was used as backcast data in the model and a forecast was made for the year 2000. The
performance of the model was tested by comparing actual sales with the forecasted sales of
different garment class for year 2000. On an average, a correlation of 90% was found between
the forecasted and actual sales using statistical time series model. Between the two quantitative
models, the model based on genetic algorithms gave an average correlation of 90% and
outperformed the model based on neural networks, which gave an average correlation of 70%.

DATA COLLECTION
It is important to have a good backcast in order to get a good forecast. Hence, it is important to
have a set of data from the past few years. Mothers Work Inc. is collaborating with our team and
is providing sales data for different apparels for the current and previous years. The data for the
previous years (1997-2000) has much fewer independent variables as compared to the data for
the current year 2001. This is evident from the two tables below:

     UNITS               PRICE                 CLASS                  STORE            DATE

        1                 19.9                    X                   Store_1        6/28/1997

        1                 19.9                    Y                   Store_2        6/28/1997

                                 Table 1. Sales data format for 1/1997-5/2001




                     National Textile Center Annual Report: November 2001
                                             I01-P10
                                                1
                                                                                                                  I01-P10
                                                                                                                     2
 BASE     COLOR                  SIZE                   UNITS                             PRICE                          CLASS                          STORE                                         DATE                        LABEL         QOH

 Base_1           1                  M                            1                         19.9                                X                       Store_1                                6/28/2001                          Label_1        0

 Base_2           49                 XL                           1                         19.9                                Y                       Store_2                                6/28/2001                          Label_2        0

                                                             Table 2. Sales data format for 6/2001 onwards

METHODOLOGY AND RESULTS
Our approach is multi-pronged. We are investigating two different approaches of forecasting
such as statistical and quantitative (using neural networks, genetic algorithms). Due to limited
number of fields available in the data, univariate statistical model and quantative models with
only three independent variables were used.

Statistical Model

Lack of independent variables such as color, size etc. for the sales data of year 1997-2000
resulted in the use of univariate time-series analysis.

                                                                                    Daily Sales(Garment Class X)
                                                                                              1997-2000

                  3500000


                  3000000


                  2500000
          Sales




                  2000000
                                                                                                                                                                                                                                   Daily Sale
                  1500000


                  1000000


                   500000


                        0
                                                                                                                                                            1035
                                                                                                                                                                   1082
                                                                                                                                                                          1129
                                                                                                                                                                                 1176
                                                                                                                                                                                        1223
                                                                                                                                                                                               1270
                                                                                                                                                                                                      1317
                                                                                                                                                                                                             1364
                                                                                                                                                                                                                    1411
                                                                                                                                                                                                                           1458
                                          142
                                                189
                                                      236
                                                            283
                                                                  330
                                                                        377
                                                                              424
                                                                                    471
                                                                                          518
                                                                                                565
                                                                                                      612
                                                                                                            659
                                                                                                                  706
                                                                                                                        753
                                                                                                                              800
                                                                                                                                    847
                                                                                                                                          894
                                                                                                                                                941
                                                                                                                                                      988
                                48
                                     95
                            1




                                                                                                                  Day

                       Fig. 1. Daily sales of a particular garment-class X from 1/1/1997 to 12/31/2000

From the graph in Fig. 1, it is clear that data exhibits a seasonal trend. Exponential smoothing
and Box-Jenkins models are appropriate for use in forecasting of such seasonal data. Box-
Jenkins is a correlation technique that extrapolates correlation of the data from the past to the
future. If these correlations are strong, homogenous and stable, then Box-Jenkins is likely to
outperform exponential smoothing. However, if the data are highly irregular, or if the
correlations are changing over time, then Box-Jenkins can perform poorly. If there are evidences
of unstable or volatile behavior in the data, then we might expect that exponential smoothing will
outperform Box-Jenkins.

Sales data from the past three years (1997 – 1999) was used as backcast data in the model and a
forecast was made for the year 2000. The performance of the model was tested by comparing


                                 National Textile Center Annual Report: November 2001
                                                         I01-P10
                                                            2
                                                                                            I01-P10
                                                                                               3
actual sales of 2000 with the forecasted sales. On critically analyzing the data, it was found that
data showed two trends; one is seasonal and the other is weekly. This is expected as sales do
typically increase during weekends as opposed to weekdays. Weekly trend is eliminated by
adding daily sales data for each week, thus resulting in weekly sales data. This is done to better
forecast seasonal trends.

The model is used to forecast weekly sales of different garment classes for the year 2000. The
results for two different classes can be seen below in Fig. 2.

                                                                   Weekly Sales(Garment Class X)
                                                                             Year 2000

                     35000000


                     30000000


                     25000000
             Sales




                     20000000
                                                                                                                                                                   Actual Sales

                     15000000
                                                                                                                                                                   Forecasted Sales


                     10000000


                     5000000


                           0
                                                    11
                                                         13
                                                              15
                                                                   17
                                                                        19
                                                                             21
                                                                                  23
                                                                                       25
                                                                                            27
                                                                                                 29
                                                                                                      31
                                                                                                           33
                                                                                                                35
                                                                                                                     37
                                                                                                                          39
                                                                                                                               41
                                                                                                                                    43
                                                                                                                                         45
                                                                                                                                              47
                                                                                                                                                   49
                                                                                                                                                        51
                                1
                                    3
                                        5
                                            7
                                                9




                                                                                  Week No.                                                                   Correlation =0.97

          Fig. 2a. Actual versus forecasted sales of Class X for year 2000 using statistics based model

                                                               Weekly Sales(Garment Class Y)
                                                                        Year 2000

                      9000000

                      8000000

                      7000000

                      6000000
             Sales




                      5000000                                                                                                                                         ual es
                                                                                                                                                                  A ct Sal

                      4000000                                                                                                                                     For     ed es
                                                                                                                                                                     ecast Sal

                      3000000

                      2000000

                      1000000

                                0


                                                                              Week No.                                                                       Correlation =0.94


          Fig. 2b. Actual versus forecasted sales of Class Y for year 2000 using statistics based model



As observed in Figs. 2a and 2b, the forecasting model provides a good correlation between actual
and forecasted weekly sales.



                                National Textile Center Annual Report: November 2001
                                                        I01-P10
                                                           3
                                                              I01-P10
                                                                 4
Quantitative Models

Neural Networks(NN)

Neural networks mimic some of the parallel processing capabilities of the human brain as models
of simple and complex forecasting applications. These models can be good at identifying
nonlinear and interactive relationships and hence can provide good forecasts. The architecture of
the feed forward neural network is shown in Fig 3. The hidden layers are the regions in which
several input combinations from the input layer are fed and the resulting output is finally fed to
the output layer. {x1,x2,….,xM} is the training vector and {z1,z2,….,zM} is the output vector.

                                        z1        z2          zM
                                                                                 Output layer (sales forecast)

                                                       •••
                                 3
                                wij
                                                       •••                        Hidden layers
                                 2
                                wij
                                                       •••
                                w1
                                 ij
                                        x1        x2 • • • xM                  Input layer (independent variables)

                             Fig. 3. Multilayer Perceptron model used for forecasting sales

The error E of the network is computed as the difference between the actual and the desired
output of the training vectors and is given as
                                                       NL P
                                               1
                                      E =
                                             P.N L
                                                       ∑ ∑1(t
                                                       n =1 p =
                                                                   ( p)
                                                                   n      − sn p) ) 2
                                                                             (



where tn(p) is the desired output for the training data vector p and sn(p) is the calculated output for
the same vector. The update equation for the weights of individual nodes in the different layers is
defined using the first derivative of the error E as
                                                                            ∂E
        wi( n )(l) = wi( n )(l) + ∆wi( n )(l) ; where    ∆wi( n )(l) = − η ( n )
                                                                          ∂wi (l)
Our research team used simple backpropagation multiplayer perceptron neural networks as
shown above for forecasting sales using the previous year sales as training data.

Unlike univariate approach in time series analysis, a multivariate modeling was tried with NN.
The following is an example input file used to train (and also to test the neural network):

  Dependent Variable                                                Independent Variable
          Sales                        Day                         Week No.                         Year
         XXX                            1-4                           1-52                        1997-2000
        More than 1000 vectors are used to train the net and 365 vectors are used to test its performance.
                             Table 3. Format of input file used to train and test NN

Sales   - Output variable. It is the total sales of a particular garment-class on a particular date.



                          National Textile Center Annual Report: November 2001
                                                  I01-P10
                                                     4
                                                                                                               I01-P10
                                                                                                                  5
Day     - Input variable. Seven day of week are categorized into 4 categories: 1 for Monday through Thursday, 2 for
          Friday, 3 for Sunday, and 4 for Saturday.
Week No .- Input variable. Range 1 to 52.
Year    - Input variable. Range: for training the network-1997-1999, for testing the network – 2000.


The comparison of forecasted sales and actual sales results for year 2000 for two garment classes
can be seen in Fig.4.

                                                                           Daily Sales (Garment Class X)
                                                                                     Year 2000

                         2000000

                         1800000

                         1600000

                         1400000

                         1200000
                 Sales




                                                                                                                                                                                                             Actual Sales
                         1000000
                                                                                                                                                                                                             Forecasted Sales
                          800000

                          600000

                          400000

                          200000

                               0
                                        15
                                             29
                                                  43
                                                       57
                                                            71
                                                                 85
                                                                      99
                                   1




                                                                           113
                                                                                  127
                                                                                         141
                                                                                                155
                                                                                                       169
                                                                                                              183
                                                                                                                     197
                                                                                                                            211
                                                                                                                                   225
                                                                                                                                          239
                                                                                                                                                 253
                                                                                                                                                        267
                                                                                                                                                               281
                                                                                                                                                                      295
                                                                                                                                                                             309
                                                                                                                                                                                    323
                                                                                                                                                                                           337
                                                                                                                                                                                                  351
                                                                                                       Day                                                                                               Correlation =0.76


                Fig. 4a. Actual versus forecasted sales of Class X for year 2000 using NN based model


                                                                           Daily Sales(Garment Class Y)
                                                                                     Year 2000

                         8000000

                         7000000

                         6000000

                         5000000
                 Sales




                         4000000                                                                                                                                                                              Actual Sales
                         3000000                                                                                                                                                                              Forecasted Sales

                         2000000

                         1000000

                               0
                                        15
                                             29
                                                  43
                                                       57
                                                            71
                                                                 85
                                                                      99
                                    1




                                                                            113
                                                                                   127
                                                                                          141
                                                                                                 155
                                                                                                        169
                                                                                                               183
                                                                                                                      197
                                                                                                                             211
                                                                                                                                    225
                                                                                                                                           239
                                                                                                                                                  253
                                                                                                                                                         267
                                                                                                                                                                281
                                                                                                                                                                       295
                                                                                                                                                                              309
                                                                                                                                                                                     323
                                                                                                                                                                                            337
                                                                                                                                                                                                   351




                         -1000000


                                                                                                        Day                                                                                              Correlation =0.69


                Fig. 4b. Actual versus forecasted sales of Class Y for year 2000 using NN based model

From Figs. 4a and 4b, it is observed that the neural network approach did not give good
correlation between actual and forecasted sales. An important reason for this observation is the
fact that the data has too few parameters in the input vectors used for training the network. This
is one of the drawbacks of using neural network approach with the data from the previous years.




                                   National Textile Center Annual Report: November 2001
                                                           I01-P10
                                                              5
                                              I01-P10
                                                 6

Genetic Algorithms (GA)

Genetic algorithms are inspired by Darwin's theory about evolution. Solution to a problem
solved by genetic algorithms is evolved.
Algorithm is started with a set of solutions (represented by chromosomes) called population.
Solutions from one population are taken and used to form a new population. This is motivated by
a hope, that the new population will be better than the old one. Populations which are selected to
form new solutions (offspring) are selected according to their fitness - the more suitable they are
the more chances they have to reproduce.
This is repeated until some condition (for example number of populations or improvement of the
best solution) is satisfied.
Outline of the Basic Genetic Algorithm
   1. [Start] Generate random population of n chromosomes (suitable solutions for the
      problem)
   2. [Fitness] Evaluate the fitness f(x) of each chromosome x in the population
   3. [New population] Create a new population by repeating following steps until the new
      population is complete
           1. [Selection] Select two parent chromosomes from a population according to their
              fitness (the better fitness, the bigger chance to be selected)
           2. [Crossover] With a crossover probability cross over the parents to form a new
              offspring (children). If no crossover was performed, offspring is an exact copy of
              parents.
           3. [Mutation] With a mutation probability mutate new offspring at each locus
              (position in chromosome).
           4. [Accepting] Place new offspring in a new population
   4. [Replace] Use new generated population for a further run of algorithm
   5. [Test] If the end condition is satisfied, stop, and return the best solution in current
      population
   6. [Loop] Go to step 2
**End**

The input file format used for the forecast model based on genetic algorithm is the same as used
for neural network model.




                    National Textile Center Annual Report: November 2001
                                            I01-P10
                                               6
                                                   I01-P10
                                                      7
The comparison of forecasted sales and actual sales results for year 2000 for two garment classes
could be seen in Fig. 5.

                                         Daily Sales(Garment Class X)
                                                   Year 2000

                     2500000



                     2000000



                     1500000
             Sales




                                                                                          ual es
                                                                                      A ct Sal
                                                                                      For     ed es
                                                                                         ecast Sal
                     1000000



                     500000



                          0



                                                 Day                             Correlation =0.94


            Fig. 5a. Actual versus forecasted sales of Class X for year 2000 using GA based model

                                         Daily Sales(Garment Class Y)
                                                   Year 2000

                     8000000

                     7000000

                     6000000

                     5000000
             Sales




                                                                                          ual es
                                                                                      A ct Sal
                     4000000
                                                                                      For     ed es
                                                                                         ecast Sal
                     3000000

                     2000000

                     1000000

                          0



                                                 Day                             Correlation =0.95


            Fig. 5b. Actual versus forecasted sales of Class Y for year 2000 using GA based model

From Figs. 5a and 5b, it can be seen that GA performed much better than NN with same set of
input-output data.


CONCLUSION
The univariate statistical time series model performed quite well. The model was used to
forecast year 2000 sales for different garment classes and the results were then compared with
the actual sales. On an average, a correlation of about 90% was found between the forecasted and
actual sales.




                           National Textile Center Annual Report: November 2001
                                                   I01-P10
                                                      7
                                            I01-P10
                                               8
Between the two quantitative models, the model based on genetic algorithms gave an average
correlation of 90% and outperformed the model based on neural networks, which gave an
average correlation of 70%.

Work is currently in progress to convert standard input parameters into fuzzified inputs. Sales
data like ours it is very helpful when there are no sharp boundaries while an input variable
transits from one value to the other. For example, 52 weeks can be compressed into fewer
numbers using fuzzy rules which will help neural networks and genetic algorithms learn
efficiently and provide better forecasts.




                   National Textile Center Annual Report: November 2001
                                           I01-P10
                                              8

				
DOCUMENT INFO