Advances in Fuzzy Systems

Volume 2012 (2012), Article ID 785709, 6 pages

doi:10.1155/2012/785709

Research Article

A New Time-Invariant Fuzzy Time Series Forecasting Method Based on Genetic Algorithm

Erol Eğrioğlu

Department of Statistics, Faculty of Arts and Science, University of Ondokuz Mayıs, 55139 Samsun, Turkey

Received 8 April 2012; Revised 3 May 2012; Accepted 13 May 2012

Academic Editor: Ferdinando Di Martino

Copyright © 2012 Erol Eğrioğlu. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract.

In recent years, many fuzzy time series methods have been proposed in the literature. Some of these methods use the classical fuzzy set theory, which needs complex matricial operations in fuzzy time series methods. Because of this problem, many studies in the literature use fuzzy group relationship tables. Since the fuzzy relationship tables use order of fuzzy sets, the membership functions of fuzzy sets have not been taken into consideration. In this study, a new method that employs membership functions of fuzzy sets is proposed. The new method determines elements of fuzzy relation matrix based on genetic algorithms. The proposed method uses first-order fuzzy time series forecasting model, and it is applied to the several data sets. As a result of implementation, it is obtained that the proposed method outperforms some methods in the literature.

1. Introduction

The fuzzy time series were firstly defined in Song and Chissom [1]. Many time series in the real life have uncertainty observations. This kind of the time series is called fuzzy time series. For example, some of these time series are stock index data, air pollution data, enrollment data, and temperature data. The observations of these time series are convertible to fuzzy sets. The fuzzy time series separate two classes which are time-variant and time-invariant. The time-invariant fuzzy time series have time-invariant relationship of lagged fuzzy time series variables. This relationship is proved from an “” matrix, which is invariant in the time space. The first method for forecasting time-invariant time series is proposed in Song and Chissom [2], in which the membership of observations is determined, subjectively. Chen [3] proposed fuzzy time series method which does not need complex matricial operations, and it uses fuzzy group relationship tables. Since these use order of fuzzy sets, the membership functions of fuzzy sets are not taken into consideration. Sullivan and Woodall [4] proposed fuzzy time series method based on Markov Chains. All of these methods forecast fuzzy time series based on first-order fuzzy time series forecasting model.

In the literature, many fuzzy time series forecasting method are based on high-order fuzzy time series model, bivariate fuzzy time series model, and multivariate fuzzy time series model. Some of these methods are due to Chen [5], Aladag et al. [6], and Egrioglu et al. [7]. Generally, fuzzy time series methods are based on three stages. These are fuzzification, determination of fuzzy relation, and defuzzification. In the literature, the fuzzy time series methods are improved by employing various artificial intelligence techniques in these three stages. The genetic algorithms, particle swarm optimization, and fuzzy c-means methods are used in the fuzzification stage. Feed forward neural networks are used determining fuzzy relation and defuzzification stage.

Many proposed methods in the literature neglected membership values of fuzzy sets. In this study, we proposed new fuzzy time series forecasting method for first order fuzzy time series forecasting model. The proposed method takes into account of membership values. Moreover, the proposed method does not need complex matricial operations and outperforms the well-known methods in the literature.

In Section 2 are given some important definitions. In Section 3, the fuzzy c-means method is summarized. In Section 4, genetic algorithm is briefly explained. In Section 5, we present details of our proposed methods. In Section 6, the proposed method is applied to some data sets, and we present results of implementation.

2. The Some Definitions Related to Fuzzy Time Series

The fuzzy time series were firstly defined in Song and Chissom [1]. The time-variant and time-invariant fuzzy time series definitions are given below.

Definition 1. Let   , a subset of real numbers, be the universe of discourse on which fuzzy sets are defined. If is a collection of ,  , then is called a fuzzy time series defined on .

Definition 2. Suppose is implied by only, that is, . Then this relation can be expressed as , where is the fuzzy relationship between and , and is called the first order model of .

Definition 3. Suppose is a first-order model of . If for any , is independent of , that is, for any , , then is called a time-invariant fuzzy time series, otherwise it is called a time-variant fuzzy time series.

The symbol “” stands for max-min composition of fuzzy sets. Song and Chissom [2] firstly introduced an algorithm based on the first order model for forecasting time invariant . In Song and Chissom [2], the fuzzy relationship matrix is obtained by many matricial operations. The fuzzy forecasts are obtained based on max-min composition as follows:

The dimension of is depending on number of fuzzy sets which are partition number of universe and discourse. If we use more fuzzy sets, we need more matricial operations for obtaining . In this situation, Song and Chissom’s [2] method is getting more complex.

3. The Fuzzy C-Means Clustering Method: An Overview

Song and Chissom [1] method uses decomposition of the universe discourse in the stage of fuzzification. There are two problems: the number of intervals of arbitrary length and the arbitrary choice of membership degrees. In order to overcome these problems, Cheng et al. [8] and Li et al. [9] fuzzy c-means (FCM) clustering method was used. FCM clustering method was firstly introduced by Bezdek [10]. Let be the membership, the center of cluster, the number of variables, and the number of clusters. Then the objective function, which is minimized in FCM, is

where is a constant greater than 1 and is a distance between the observation and the center of the cluster. is minimized with subject the constraints:

In this method, the minimization is done by an iterative algorithm. In each repetition, the values of and are updated by the formulas given in (4):

4. Genetic Algorithm: An Overview

Chen and Chung [11], Lee et al. [12] used genetic algorithm in fuzzification stage. The genetic algorithms were first proposed by Holland [13]. The genetic algorithms have population size, evaluation function, cross-over rate, mutation rate and maximum generation number. The genetic algorithm researches an optimal solution with many chromosomes. In a chromosome, there are many genes. Generally, the genetic algorithm starts with random population whose size is determined by user according to the problem under study. For example, Chen and Chung [11] used 50 as population size and the new generation is produced by various techniques in the iterations. Some of these techniques are crossover, mutation, and natural selection, summarized as follows.

Crossover

The system randomly selects two chromosomes from a population and randomly selects a crossover point from the two selected chromosomes to exchange genes after the crossover point. The crossover operation is depending on crossover rate. The random number generates uniform distribution, then the crossover operation is applied if random number is bigger than crossover rate.

Mutation

The user must determine a mutation rate. Then a chromosome is randomly selected. If the system randomly generates a real value between zero and one, which is smaller than or equal to the mutation rate, then the system performs the mutation operation with a randomly selected gene from the chromosomes.

Natural Selection

Each chromosome of any generation is evaluated according to evaluation function. All chromosomes are ordered according to evaluation function value. The best chromosomes are transferred to the next generation. Some worst chromosomes are discarded from generations, and the new chromosomes are admitted to the new generation.

5. The Proposed Method for Forecasting First Order Fuzzy Time Series Method

Here, we study forecasting time-invariant fuzzy time series. The FCM is used for fuzzification of time series, and genetic algorithm is used for finding the fuzzy relation. The proposed method has the following important advantages:

(i)the membership values of the fuzzy sets are taken into consideration;(ii)there is no necessity of complicated matricial operations;(iii)FCM no needs subjective decisions by using partition of the universe of discourse.

The algorithm is given below in step by step as follows.

Step 1 (Time series are fuzzified by FCM). Let be the number of fuzzy sets such that . FCM initially assigns crisp values to the fuzzy sets. After this application, the center of each cluster is determined and denoted by .

Step 2 (Determination of the parameters of genetic algorithm). The evaluation function is the RMSE as follows:

being the crisp time series, the defuzzified forecast, and is the number of forecasts. The other parameters are selected as follows:

  population size: 30; crossover rate: 1; mutation rate: 0.01;  maximum generation: 300; number of discarded chromosomes in the natural selection: 10.

Step 3 (Initialization). The genes are the elements of the crisp relation (Figure 1):

Figure 1: The structure of one chromosome.

Step 4 (Crossover operation). The crossover operation is applied if the random number is bigger than the crossover rate. The system randomly selects two chromosomes from a population and randomly selects a crossover point from the two selected chromosomes to exchange genes after the crossover point. The crossover operation is shown in Figure 2.

Figure 2: An example of crossover operation.

Step 5. If the system randomly generates a real value between zero and one which is smaller than or equal to the mutation rate, then the system performs the mutation operation with a randomly selected gene from the chromosomes. The mutation operation is demonstrated in Figure 3. is randomly generated from interval.

Figure 3: An example of mutation operation.

Step 6. The method for calculating RMSE for any chromosome is given in Substeps 6.1–6.4.

Substep 6.1. c-gens constitute in the rows of .

Substep 6.2. Fuzzy forecasts are obtained using (1). After is estimated, fuzzy forecasts can be obtained by using FCM algorithm. For example, for any , the th fuzzy observation is given as follows:

The fuzzy forecast for time is computed by (1) as follows:

Substep 6.3. If the membership values of a fuzzy forecast have only one maximum, then select the center of this cluster as the defuzzified forecasted value. If the membership values of an fuzzy forecast has two or more maximum, then select the arithmetic mean of centers of the corresponding clusters as the defuzzified forecasted value. For example, if , then the maximum is 0.7 and then the fuzzified forecast is , center of . If , then the maximum is 0.7 and then fuzzified forecast is arithmetic mean of center of cluster and , center of .

Substep 6.4. RMSE is computed by (5).

Step 7 (Natural selection operation). All chromosomes are ordered according to the RMSE value. The best 20 chromosomes are transferred to the next generation. 10 chromosomes are discarded from the generation. The new 10 randomly generated chromosomes are replaced in the new generation.

Step 8. Steps 4 and 7 are repeated 300 times.

6. Implementation

The proposed method is firstly applied to Alabama University Enrollment data (1971–1992) which is well known in the literature. The Enrollment data are given Table 1.

Table 1: Enrollment data.

Years
Actual
Years
Actual

1971
13055
1982
15433

1972
13563
1983
15497

1973
13867
1984
15145

1974
14696
1985
15163

1975
15460
1986
15984

1976
15311
1987
16859

1977
15603
1988
18150

1978
15861
1989
18970

1979
16807
1990
19328

1980
16919
1991
19337

1981
16388
1992
18876

The proposed method is programmed in Matlab 7.9 version. In the application, we use seven fuzzy sets () in Step 1. The centers of clusters and the membership values from FCM algorithm are given Tables 2 and 3, respectively. The fuzzy and defuzzified forecasts are given in Table 4.

Table 2: centers of clusters are obtained from FCM algorithm in Step 1.

Centers of clusters

13480,6299
15003,98
15455,4
15965,12
16837,86
18161,53
19144,4

Table 3: The memberships of the observations to clusters are obtained from FCM algorithm in Step 1.

Years
Cluster 1
Cluster 2
Cluster 3
Cluster 4
Cluster 5
Cluster 6
Cluster 7

1971
0,8889
0,0424
0,0279
0,0190
0,0113
0,0062
0,0043

1972
0,9925
0,0032
0,0019
0,0012
0,0006
0,0003
0,0002

1973
0,8072
0,0932
0,0478
0,0274
0,0137
0,0065
0,0043

1974
0,0486
0,7570
0,1245
0,0446
0,0157
0,0060
0,0036

1975
0,0000
0,0001
0,9998
0,0001
0,0000
0,0000
0,0000

1976
0,0048
0,1716
0,7757
0,0378
0,0069
0,0020
0,0011

1977
0,0039
0,0485
0,7993
0,1328
0,0114
0,0027
0,0014

1978
0,0017
0,0135
0,0601
0,9116
0,0104
0,0019
0,0009

1979
0,0001
0,0003
0,0005
0,0013
0,9971
0,0005
0,0002

1980
0,0005
0,0018
0,0030
0,0071
0,9821
0,0042
0,0013

1981
0,0093
0,0409
0,0900
0,4378
0,3869
0,0249
0,0103

1982
0,0001
0,0027
0,9950
0,0018
0,0003
0,0001
0,0000

1983
0,0004
0,0070
0,9835
0,0078
0,0009
0,0002
0,0001

1984
0,0057
0,7977
0,1647
0,0236
0,0055
0,0017
0,0010

1985
0,0066
0,7367
0,2179
0,0290
0,0066
0,0021
0,0012

1986
0,0001
0,0004
0,0013
0,9977
0,0005
0,0001
0,0000

1987
0,0000
0,0001
0,0002
0,0006
0,9987
0,0003
0,0001

1988
0,0000
0,0000
0,0000
0,0000
0,0001
0,9997
0,0001

1989
0,0010
0,0018
0,0023
0,0032
0,0063
0,0438
0,9416

1990
0,0009
0,0017
0,0022
0,0029
0,0052
0,0239
0,9632

1991
0,0010
0,0019
0,0024
0,0031
0,0057
0,0258
0,9601

1992
0,0021
0,0041
0,0052
0,0072
0,0147
0,1196
0,8472

Table 4: The forecasts of the proposed method.

Years

Fuzzy forecasts

Defuzzified forecasts

1972
0,8694
0,8279
0,7866
0,3820
0,2837
0,1199
0,0430
13480,63

1973
0,8694
0,8279
0,7866
0,3820
0,2837
0,1199
0,0430
13480,63

1974
0,8072
0,8072
0,7866
0,3820
0,2837
0,1199
0,0478
14242,00

1975
0,3643
0,5920
0,7570
0,7570
0,6596
0,4888
0,1245
15710,00

1976
0,5000
0,9998
0,3584
0,9998
0,8535
0,3184
0,2807
15484,55

1977
0,5000
0,7757
0,3584
0,7757
0,7757
0,3184
0,2807
15935,65

1978
0,5000
0,7993
0,3584
0,7993
0,7993
0,3184
0,2807
15935,65

1979
0,4219
0,7284
0,2815
0,7736
0,9116
0,0601
0,9043
16837,86

1980
0,0022
0,9009
0,0558
0,3246
0,9971
0,9971
0,5000
17499,69

1981
0,0071
0,9009
0,0558
0,3246
0,9821
0,9821
0,5000
17499,69

1982
0,4219
0,4378
0,2815
0,4378
0,4378
0,3869
0,4378
16737,00

1983
0,5000
0,9950
0,3584
0,9950
0,8535
0,3184
0,2807
15484,55

1984
0,5000
0,9835
0,3584
0,9835
0,8535
0,3184
0,2807
15484,55

1985
0,3643
0,5920
0,7977
0,7977
0,6596
0,4888
0,1647
15710,00

1986
0,3643
0,5920
0,7367
0,7367
0,6596
0,4888
0,2179
15710,00

1987
0,4219
0,7284
0,2815
0,7736
0,9977
0,0496
0,9043
16837,86

1988
0,0022
0,9009
0,0558
0,3246
0,9987
0,9987
0,5000
17499,69

1989
0,0001
0,0001
0,5000
0,5000
0,5000
0,5000
0,9997
19144,40

1990
0,0032
0,0063
0,0438
0,0438
0,0438
0,5000
0,5621
19144,40

1991
0,0029
0,0052
0,0239
0,0239
0,0239
0,5000
0,5621
19144,40

1992
0,0031
0,0057
0,0258
0,0258
0,0258
0,5000
0,5621
19144,40

Consider

The RMSE of well-known methods [2–4] is given in Table 5.

Table 5: The RMSE values of the some first order methods and proposed method.

Methods
RMSE

Song and Chissom [2]
642,26

Sullivan and Woodall [4]
621,33

Chen [3]
638,36

Proposed method
484,61

The proposed method is successively applied to daily Istanbul stock market time series data between 28/12/2010 and 29/02/2012 dates (IMKB 100). The graph of the time series is given in Figure 4. The data between 28/12/2010 and 10/10/2011 dates are used as training data, the data between 11/10/2011 and 29/02/2012 dates are used as test data.

Figure 4: The IMKB 100 data between 28/12/2010 and 29/02/2012.

The number of fuzzy clusters is changed from 7 to 15. The obtained results from three methods are given in Table 6.

Table 6: The results of the methods for IMKB 100 data.

Method
Number of fuzzy sets
Min
Mean

7
8
9
10
11
12
13
14
15

Chen [3]
RMSE (training)
1420
1178
1340
1164
1281
1233
1152
1205
1090
1090
1252

RMSE (test)
1238
1132
1340
1191
1155
1131
1218
1125
1186
1125
1210

Song and Chissom [1, 2]
RMSE (training)
1462
1178
1340
1164
1281
1233
1140
1209
1105
1105
1257

RMSE (test)
1571
1132
1340
1191
1155
1131
1249
1121
1132
1121
1240

Proposed Method
RMSE (training)
1379
1271
1391
1360
1176
1176
1152
1089
1107
1089
1234

RMSE (test)
1565
1317
1291
1154
1118
1126
1039
1036
1022
1022
1185

The RMSE values of the proposed method are smaller than Chen’s [3] and Song and Chissom’s [1, 2] methods.

References

Q. Song and B. S. Chissom, “Fuzzy time series and its models,” Fuzzy Sets and Systems, vol. 54, no. 3, pp. 269–277, 1993.

Q. Song and B. S. Chissom, “Forecasting enrollments with fuzzy time series—part I,” Fuzzy Sets and Systems, vol. 54, no. 1, pp. 1–9, 1993.

S. M. Chen, “Forecasting enrollments based on fuzzy time series,” Fuzzy Sets and Systems, vol. 81, no. 3, pp. 311–319, 1996.

J. Sullivan and W. H. Woodall, “A comparison of fuzzy forecasting and Markov modeling,” Fuzzy Sets and Systems, vol. 64, no. 3, pp. 279–293, 1994.

S. M. Chen, “Forecasting enrollments based on high-order fuzzy time series,” Cybernetics and Systems, vol. 33, no. 1, pp. 1–16, 2002.

C. H. Aladag, M. A. Basaran, E. Egrioglu, U. Yolcu, and V. R. Uslu, “Forecasting in high order fuzzy times series by using neural networks to define fuzzy relations,” Expert Systems with Applications, vol. 36, no. 3, pp. 4228–4231, 2009.

E. Egrioglu, C. H. Aladag, U. Yolcu, V. R. Uslu, and M. A. Basaran, “A new approach based on artificial neural networks for high order multivariate fuzzy time series,” Expert Systems with Applications, vol. 36, no. 7, pp. 10589–10594, 2009.

C. H. Cheng, G. W. Cheng, and J. W. Wang, “Multi-attribute fuzzy time series method based on fuzzy clustering,” Expert Systems with Applications, vol. 34, no. 2, pp. 1235–1242, 2008.

S. T. Li, Y. C. Cheng, and S. Y. Lin, “A FCM-based deterministic forecasting model for fuzzy time series,” Computers and Mathematics with Applications, vol. 56, no. 12, pp. 3052–3063, 2008.

J. C. Bezdek, Pattern Recognition with Fuzzy Objective Function Algorithms, Plenum Press, New York, NY, USA, 1981.

S. M. Chen and N. Y. Chung, “Forecasting enrollments using high-order fuzzy time series and genetic algorithms,” International Journal of Intelligent Systems, vol. 21, no. 5, pp. 485–501, 2006.

L. W. Lee, L. H. Wang, and S. M. Chen, “Temperature prediction and TAIFEX forecasting based on fuzzy logical relationships and genetic algorithms,” Expert Systems with Applications, vol. 33, no. 3, pp. 539–550, 2007.

J. H. Holland, Adaptation in Natural and Artificial Systems, MIT Press, Cambridge, Mass, USA, 1975.