Fuzzy Time Series Based on Defining Interval Length with Imperialist ...

0 downloads 0 Views 808KB Size Report
metaheuristic algorithm (ICA), Imperialist Competitive. Algorithm, is implemented. ICA can determine accurate interval length and it directly leads to results of ...
Fuzzy Time Series Based on Defining Interval Length with Imperialist Competitive Algorithm M.H. Fazel Zarandi, A.Molladavoudi, A. Hemmati Industrial Engineering Department, Amirkabir University of Technology (Polytechnic) Tehran, Iran [email protected], [email protected], [email protected] Determining interval length in fuzzy time series has been one of the main concerns of many researchers in this area. Since an interval length has a continuous nature, in this paper, a novel metaheuristic algorithm (ICA), Imperialist Competitive Algorithm, is implemented. ICA can determine accurate interval length and it directly leads to results of fuzzy time series. For checking the validity of proposed model and algorithm, three well known bench mark problems, Daily Temperature in Taipei (Taiwan (1996), TAIFEX series (1996), and Alabama University Enrollment, is used. The results show that the proposed model can reduce both MSE and MAPE in all above mentioned bench mark problems. Keywords – Fuzzy time series, interval length, fuzzy logical relationships, ICA, Defuzzification

I. INTRODUCTION Temperature prediction, stock price behavior, growth of population, etc. are some examples of future prediction. On the other hand, information for human decisions is usually vague. Fuzzy set theory is a powerful tool to model vague decisions. Fuzzy time series is used when we encounter lack of information. References [1], [2] and [3] presented with basic concepts of fuzzy time-series and methods to model fuzzy relation with fuzzy logic relationship. Reference [4] presented a new method for arithmetic operation on University of Alabama enrollments data set. In [5], [4], [6], [7], [8], [9], and [10] various overviews to develop new methods in fuzzy time series forecasting are presented. Reference [11] proposed the concept of fuzzy valued probability distributions and extended existing approaches to fuzzy stochastic time series. Following [6] applied high-order fuzzy time series model. Reference [13] proposed a high-order time variant method to enhance the enrollments forecast by double dividing the intervals. Reference [14] established a type II fuzzy time series. Reference [10] proposed a model to define different parameter as relation between Fuzzy Logic Relationship (FLR) groups. In the presented model, membership degrees of fuzzified data are defined by relations between fuzzy sets and weighted fuzzy logical relationship for forecasting. Next Centroid Defuzzification is utilized for final forecasting. We use Imperialist Competitive Algorithm (ICA) for Interval Length definition. Imperialist Competitive Algorithm (ICA) is a novel global search method presented for solving various

optimization problems [15]. Applying ICA can lead to encouraging result in both convergence rate and better global optima achievement ([16], [17], [18], [19] and [20]). Reference [16] designed an optimal controller which optimally controls an industrial Multi Input Multi Output distillation column process with ICA in addition to decentralizing it. Reference [17] approximately did the same for a more sophisticated MIMO system which is a 3*3 model of Evaporator Plant. In [18], ICA is implemented via reverse analysis of an artificial neural network for characterizing the properties of materials from sharp indentation test. Reference [20] used ICA in “Prioritized user-profile” approach to recommender systems, trying to implement more personalized recommendation by assigning different priority importance to each feature of the user-profile in different users. The rest of paper is organized as follows: Section II introduces some preliminaries based on fuzzy time series principles including fuzzy logical relationships, fuzzy logical groups, time variant and time invariant fuzzy time series. Section III discusses Chen’s model [4] as a base to our presented approach. In section IV we introduce Imperialist Competitive Algorithm (ICA). Section V explains the proposed method in detail. Section VI applies the model to a case study to demonstrate the performance of the presented model and compares the presented model with the highlighted approaches to show its dominance. Finally conclusion and future works are presented in section VII. II. PRILIMINARIES In this section, some basic definitions and concepts of fuzzy time series are given. Song & Chrisom ([1], [2], [3]) proposed some definitions base of which the recent extensions of fuzzy time series methods are established. These definitions are as follows: Definition 1 References ([1], [2], [3]): Fuzzy time-series: Let Y ( t ), ( t = 1, 2 , ..., n ) a subset of real numbers, be the universe of discourse by which fuzzy sets f j (t ) are defined. If F (t ) is a collection of f 1 ( t ), f 2 ( t ), . . . then F (t ) is called a fuzzy time-series defined on Y ( t ) . Definition 2 References ([1], [2], [3]): If there exists a fuzzy such logical relationship R ( t − 1 , t ) , that F ( t ) = F ( t − 1)

978-1-4244-7858-3/10/$26.00 ©2010 IEEE

R ( t − 1, t ) ,

where

‘‘

’’

represents the max–min composition operator, F ( t − 1 ) and

F (t ) are fuzzy sets, then F ( t ) is said to be caused by F ( t − 1 ) . The logical relationship between and can be represented as: F (t ) F ( t − 1) F ( t − 1 ) → F ( t ). Definition Let F

3

References

([1],

( t − 1) = A i , F ( t ) = A j .

between

two

consecutive

[2],

The

[3]):

relationship

observations,

F (t )

and F ( t − 1 ) , referred to as a fuzzy logical relationship (FLR), can be denoted by A i → A j , where left hand side (LHS) and

Aj

Ai is called the

the right-hand side (RHS) of the

FLR. Definition 4 References ([1], [2], [3]): All fuzzy logical relationships in the training data set can be further grouped together into different fuzzy logical relationship groups according to the same left-hand sides of the fuzzy logical relationship. For example, there are two fuzzy logical relationships with the same left-hand side ( A i ) : A i → A j 1 and A i → A j 2 . These two fuzzy logical relationships can be merged into one same fuzzy logical relationship group. Definition 5 References ([1], [2], [3]): Suppose F (t ) is merely caused by F ( t ) = F ( t − 1 ) R ( t − 1 , t ) . F ( t − 1 ) meaning For any t, if R ( t − 1 , t ) is independent of t, then F (t ) is named a time-invariant fuzzy time-series, otherwise a timevariant fuzzy time series. In the current model fuzzy logical relationship (FLR) are defined between two pairs of sets rather than two single sets. The FLRs are classified into fuzzy logical relationship groups according to their first entry of the left hand side (LHS); therefore, the matrix of weights is constructed using above-mentioned concepts, explained as definitions. The conventional model originated by [4] is explained as follows. We used this basic approach in our model but we use ICA for determining Interval Length. III. CHEN’S ALGORITHM We have used weighted Fuzzy Logic Relationship which was presented in [4]. The steps of the algorithm are as follows [4]: Step 1: Define the universe of discourse and intervals for rules abstraction, as: U=[Starting, Ending] As the length of interval is determined, U can be partitioned into several equal length intervals. Step 2: Define fuzzy sets based on the universe of discourse and fuzzify the historical data. Step 3: Fuzzify observed rules. For example, a datum is fuzzified to A j if the maximal degree of membership of that datum is in

Aj .

Step 4: Establish fuzzy logical relationships and group them based on the left hand side (LHS) of fuzzy logical

relationships. For example:

A1 → A 2 , A1 → A1 , A1 → A 3 group as A1 → A1 , A 2 , A 3 .

, can be merged into a

Step 5: Forecast: Let F ( t − 1 ) = A i . Case 1: There is only one fuzzy logical relationship in the fuzzy logical relationship sequence. If Ai → A j , then F

(t ) , the forecasting value, is equal to A j .

Case 2: If

Ai → Ai , A j , ..., A k . ,

forecasting value is equal to

then F

(t ) ,

the

A i , A j , ..., A k .

Step 6: Defuzzifiy outcomes obtained from the previous step. Apply ‘‘Centroid’’ method to get the results. This procedure (also called center of area, center of gravity) is the most often adopted method of defuzzification. IV. Imperialist Competitive Algorithm(ICA) Imperialist Competitive Algorithm (ICA) is a new global search heuristic which applied imperialism and imperialistic competition process as a source of inspiration [15]. Figure 1 shows the pseudo code of this algorithm. ICA starts with an initial population. Some of the best individuals of this population, called countries, are picked up as the imperialist states and all the rests make the colonies of these imperialists. Due to imperialists’ powers that are reversely proportional to their cost, the colonies of initial population are divided among them. Having distributed colonies between imperialists and establishing the initial empires, these colonies commence proceeding toward their relevant imperialist country. Figure 2 demonstrates the movement of a colony towards the imperialist. In this movement, θ and x are arbitrary numbers which are generated uniformly. x ∼ U (0, β × d ) θ ∼ U (−γ , γ )

Here, d is the distance between colony and imperialist and

β

must be greater than 1. A value of β >1 causes the colonies to get closer to the imperialist state from both sides. Moreover γ is a parameter that adopts the deviation from the main direction. Although

β

and γ are random numbers, most of

the times: the best fitted value of

2 and π / 4 (Rad).

β

and γ are approximately

Pseudo code for the proposed algorithm 1) Choose some random points on the function and start the empires. 2 Proceed the colonies toward their relevant imperialist. 3) If there is a colony in an empire with lower cost than that of imperialist, swap the positions of that colony and the imperialist. 4) Calculate the total cost of all empires (Related to the power of both imperialist and its colonies). 5) Select the weakest colony (colonies) from the weakest empire and give it (them) to the empire with the most likelihood to possess it (Imperialistic competition). 6) Omit the powerless empires. 7) If there is just one empire, stop, else go to step 2. Fig (1). Pseudo code for the proposed algorithm [15]

Fig (2). Movement of colonies toward their relevant imperialist [15] The power of the imperialist country, determines the total power of an empire in addition to the power of its colonies. More explicitly, a percentage of the mean power of each imperialist’s colonies is added to the power of imperialist to form the total power of an empire. Any empire that doesn’t improve in imperialist competition will be diminished. As a result: the imperialistic competition will grow the power of great empires and weakened the frail ones. Hence: weak empires will collapse finally. The movement of colonies toward their related imperialists along with competition among empires and also collapse mechanism will bring out the countries to converge to a state in which there exists just one empire in the world and all the rests are its colonies. In this final stage: colonies have the same position and power as the imperialist. Figure (3) shows the Flowchart of the proposed algorithm. [15]

Fig (3). Flowchart of the proposed algorithm [15] V. THE PROPOSED APPROACH In this section: a new approach based on fuzzy logical relationships and double interval division is presented. Interval length is defined with Imperialist Competitive Algorithm (ICA). Results are demonstrated for TAIFEX as an economical time series, the historical data of daily average temperature from May 1, 1996, to September 30, 1996, in Taipei, Taiwan and Enrollments of Alabama University. Suitability of the approach is claimed through its forecasting error reduction in the above-mentioned cases. The proposed approach steps are as follows: Step1: The universe of discourse U is defined and D assigned data is chosen. Extreme amounts in the set are assigned to D min and D max . D min is minimum data and

D max is maximum data, where, D 1 and D 2 are also assigned as proper numbers to help permit the noise. Then U is defined as U = [ D min − D 1 , D max + D 2 ] . A new conceptual fuzzification method is introduced which divides the universe of discourse into intervals with intersection. It means any datum belongs to two successive fuzzy sets with

different degrees of membership. This leads to results with high accuracy and extensive error reduction. While models like [4] divide U into intervals with no intersections, in the current method, each datum corresponds to two linguistic variables simultaneously. To verify the model, we utilize the Mean Absolute Percentage Error (MAPE) defined as follows: n

Actual (t ) − Forecast (t )

t =1

n * Actual (t )

MAPE = ∑

*100%

(1)

Here, n is number of data and t is the time. The Mean Square Error (MSE) is used as well to highlight privileges of the proposed method compared to other existing approaches. n

∑ ( Actual t − Forecast t ) ^ 2 MSE = t =2 n

(2)

Where, n is number of data and t is the time. Step2: Having U= [Dmin – D1, Dmax + D2], intervals with identical lengths are computed through the following procedure: There are 7 discrete intervals. 6 other intervals are constructed using midpoints of those 7 discrete intervals as their lower and upper bounds. Table 1 shows how Intervals Lengths are defined. Table1: 14 Linguistic intervals the model Linguistic Intervals

U 1 = [ a , a + z1 ] U 2 = [ a + 0 . 5 z1 , a + 1 . 5 z1 ] . . .

are identified on intervals having been constructed in the previous step. ⎧ 2 ( x − (a + 0.5 z 2 )) ⎪ z2 A2 = ⎨ ⎪− 2 z ( x − (a + z 2 )) + 1 ⎩ 2

a + 0.5 z 2 ≤ x < a + z 2

1 − m1.

j

with membership degree of

Finally, the fuzzified counterpart for that

individual datum appears to be m 1 A j

+ (1 − m 1 ) A j + 1 .

Step4: In this step: fuzzy logical relationships (FLR) are established to demonstrate the relation between successive fuzzified historical data. Employing the fuzzified series, fuzzy logical relationship groups are constructed as follows:

( A1 , A 2 ) → ( A 2 , A3 ) , ( A3 , A 4 ) , ( A 4 , A5 ) ( A 2 , A3 ) → ( A1 , A 2 ) , ( A5 , A 6 ) ( A13 , A14 ) → ( A 7 , A8 ) , ( A12 , A13 ) , ( A14 , A15 ) Step5: Matrix of weights is constructed in this step. The relationships between two or any number of linguistic variables are defined as degrees of membership by which elements in the set of data belong to corresponding fuzzy sets. The following procedure explains how the matrix of weights is built up. Firstly, we should clarify the relation between any two successive fuzzified historical data in the set. The relation here is an ordered pair, first entity of which is the degree of membership by which the second number belongs to the first fuzzy set and the second entity corresponds to its complement which demonstrates the degree of membership by which the second number belongs to the second fuzzy set. These elements are computed through the following fuzzy clustering. The completed matrix has the form in table2:

( A1 , A2 )

( A1 , A2 )

(α 1 , β 2 )

( A 2 , A3 )

′ ′ (α 2 , β 3 ) . . . ′ ′ (α 13 , β 14 )

. . . ( A 13 , A 14 )

a + z2 ≤ x ≤ a + 1.5 z 2

.

U

m 1 , then it is possible for the same datum to belong to interval U j + 1 with membership degree of its complement

P ( t − 1)

Step3: According to [1], [2] and [3] triangular membership functions has been defined for the Intervals. Triangular membership functions A i , corresponding to linguistic terms

a ≤ x ≤ a + z1

belong to interval

Table2: Fuzzy Logical Relationships (FLR) matrix P (t )

U 14 = [ a + 6 . 5 z 7 , a + 7 . 5 z 7 ] Where, zi is length of Intervals i = 1, 2 , … , 7 .

A1 = − 1 ( x − a) + 1 z1

instead of one. In proposed model if a datum happens to

( A2 , A3 )

(α 2 , β 3 )

.

.

.

.

.

.

( A 13 , A 14 ) (α 13 , β 14 )

(3)

Step6: In this step: forecasting is computed using the Fuzzy Logical Relationships (FLR) matrix and the matrix of defuzzification. While the Fuzzy Logical Relationships (FLR) matrix is getting completed, we exert some multiplication and obtain a single point as the forecasting result. The array of

Degrees of membership are computed using above mentioned membership functions. Except for some data which is in the first and the last intervals, others belong to two successive intervals simultaneously. Fuzzified counterparts of the set are represented as linear combinations of two linguistic variables

weights W ( t ) = [W 1′, W 2 , . . ., W i ] should be normalized applying the standardized weight matrix equation which is obtained as follows:

. . ⎧ 2 ( x − (a + 6.5 z13 )) ⎪ z13 A14 = ⎨ ⎪− 2 z ( x − ( a + 7 z13 )) 13 ⎩

a + 6.5 z13 ≤ x < a + 7 z13 a + 7 z13 ≤ x ≤ a + 7.5 z13





[

W W1 W , i 2 ,..., i k ] i ∑k =1Wk ∑k =1Wk ∑k =1Wk

(4)

VI.

Case studies and Comparisons to Other approaches In this section: forecasting results of three historical sets including daily temperature Taipei, Taiwan (1996), TIFEX and Alabama University Enrollment are computed applying the proposed model. Error reduction – which is one of the most important goals in time series forecasting – shows significant improvement in the proposed approach. The Mean Square Error (MSE) and Mean Absolute Percentage Error (MAPE) results are compared to [4], [7] and [6] and the current approach shows much less forecasting error. Our experiments show that ICA leads to better solutions compared to other approaches. According to this improvement, diversified applications can be assumed for the proposed model. Results are shown in Table 3 for daily temperature in Taipei, Taiwan (1996).

Table6: Comparison between Different Approaches Mean Square Error (MSE) (TAIFEX)

MSE

Equal length

SA

Our approach

Chen (1996)

Huarng (2001a)

Huarng (2001b)

846413.23

4617.10

1394.66

9668.94

7856.5

5437.58

Figure4: Actual and Forecasting Data (Temperature)

Table3: Fuzzy Logical Relationships matrix with some results P(t) P(t-1) (A1, A2) (A2, A3) . . . (A13, A14) (A1, A2) 0 (0.78, 0.82) . . . 0 (A2, A3) (1.9, 1.1) 0 . . . . . . (A13, A14) 0 Presented data shown weight degree relation between times (t-1), (t). Table4: Mean Square Error (MSE) Comparison with data set MSE Equal Intervals

SA

ICA

Temperature

0.633481228

1.153451059

0.2631

TIFEX

846413.2298

4617.098117

1394.659386

Figure5: Actual and Forecasting Data (Alabama)

9948111.113 25892921.84 183150 Alabama Table4 compares different algorithm in defining interval length with Mean Square Error (MSE).

Table5: Mean Absolute Error Comparison with data set MAPE Equal Intervals SA ICA Temperature 0.022885008 0.032266729 0.014437887 TIFEX

0.054834794

0.007481025

0.003840908

Alabama 0.137425843 0.111321651 0.022214364 Table5 compares the Mean Absolute Error (MAPE) of the proposed algorithm with SA and equal Intervals. TAIFEX forecasting is demonstrated Mean Square Error (MSE) and Mean Absolute Error (MAPE) results are demonstrated and compared to [4], [7] and [6].

Figure6: Actual and Forecasting Data (TAIFEX) In the above figures, forecasting results imitate the trend of actual data and thus, a relatively well fitted estimation is obtained. Table8: Actual and Forecasting Data (Alabama, TAIFEX) Alabama TAIFEX Forecast

Forecast

Actual

13516

Actual 13055

7705.752

7721.59

13516

13563

7564.987

7580.09

13516

13867

7455.945

7469.23

15606

14696

7455.945

7488.26

15972

15460

7401.651

7376.56

15776

15311

7463.326

7401.49

15972

15603

7402.287

7362.69

15972

15861

7463.326

7401.81

16942

16807

7564.987

7532.22

16826

16919

7564.987

7545.03

16251

16388

7602.104

7606.2

15776

15433

7720.67

7645.78

15972

15497

7705.752

7718.06

15776

15145

7861.435

7770.81

15776

15163

7887.204

7900.34

16251

15984

8051.413

8052.31

16942

16859

8023.219

8042.19

18991

18150

7887.204

7921.85

19337

18970

7887.204

7904.53

19337

19328

7602.104

7595.44

18953

19337

7861.435

7823.9

18953

18876

7705.752

7720.87

IV. CONCLUSION In this paper: a new approach is presented to forecast Daily Temperature in Taipei, Taiwan (1996), TAIFEX series (1996) and the well-known Alabama University Enrollment. A different approach of fuzzification is also proposed in which the fuzzified counterpart to each entity is a pair of successive fuzzy sets (linguistic terms) rather than a single fuzzy set. For Interval Length, we have used a new algorithm called Imperialist Competitive Algorithm (ICA). This approach handles uncertainty more appropriate than similar works in the literature and shows improvement in the results. References [1] Q. Song, B.S. Chissom,“Fuzzy time-series and its models”. Fuzzy Sets and Systems (1993a), 54, 269–277. [2] Q. Song, B.S. Chissom “Forecasting enrollments with fuzzy time series – part I”. Fuzzy set and system (1993b) , 54, 1-9. [3] Q. Song, B.S. Chissom “Forecasting enrollments with fuzzy time series – partII”. Fuzzy set and system (1994), 62, 1-8. [4] S. M. Chen, “Forecasting enrollments based on fuzzy time-series”. Fuzzy Sets and Systems (1996), 81, 311–319. [5] J. Sullivan, W.H. Woodall, “A comparison of fuzzy forecasting and Markov modeling”. Fuzzy Sets and Systems 64 (1996) 279–293. [6] S.M. Chen, J.R.Hwang, “Temperature prediction using fuzzy time series”, IEEE Transactions on Systems, Man, and Cybernetics-Part B: Cybernetics 30 (2) (2001b) 263–275.

[7] K. Huarng, “Effective length of intervals to improve forecasting in fuzzy time series”, Fuzzy Sets and Systems 123 (2001) 387–394. [8] H. K. Yu, “Weighted fuzzy time-series models for TAIEX forecasting”. Physica A (2004), 349, 609–624. [9] R.C. Tsaur, J.C.O. Yang, H.F. Wang, “Fuzzy relation analysis in fuzzy time series model”. Computer and Mathematics with Applications 49 (2005) 539–548. [10] S.R. Singh, “A robust method of forecasting based on fuzzy time series”. Applied Mathematics and Computation 188(2007), 472–484. [11] Q. Song, R. P. Leland, B. S. Chissom, “Fuzzy stochastic fuzzy time series and its models”. Fuzzy Sets and Systems, Volume 88, Issue 3, 16 June 1997, Pages 3. [12] S.M. Chen, “forecasting enrollments based on high-order fuzzy time series”, Cybernetics and Systems: An International Journal 33(2002) 1–16. Theory and Applications. Englewood Cliffs, NJ: Prentice-Hall, 1995. [13] Ching-Hsue Cheng, Tai-Liang Chen, Hia Jong Teoh, Chen-Han Chiang. “Fuzzy time-series based on adaptive expectation model for TAIEX forecasting”. Expert Systems with Applications 34 (2008), 1126–1132. [14] K. Huarng Yu, “A Type 2 fuzzy time series model for stock index forecasting”, Physica, A 346 (2005) 657–681. [15] E. Atashpaz-Gargari, C. Lucas, “Imperialist Competitive Algorithm: An algorithm for optimization inspired by imperialistic competition”. IEEE Congress on Evolutionary Computation (2007), 4661–4667. [16] E. Atashpaz-Gargari,F. Hashemzadeh, R. Rajabioun and C. Lucas, “Colonial Competitive Algorithm, a novel approach for PID controller design in MIMO distillation column process”. International Journal of Intelligent Computing and Cybernetics (2008), 1 (3), 337–355. [17] R. Rajabioun, F. Hashemzadeh, E. Atashpaz-Gargari, B. Mesgari, F. Rajaei Salmasi, “Identification of a MIMO evaporator and its decentralized PID controller tuning using Colonial Competitive Algorithm”. Accepted to be presented in IFAC World Congress (2008). [18] A. Biabangard-Oskouyi, E. Atashpaz-Gargari, N. Soltani, C. Lucas, “Application of Imperialist Competitive Algorithm for materials property characterization from sharp indentation test”. To be appeared in the International Journal of Engineering Simulation(2008). [19] R. Rajabioun, E. Atashpaz-Gargari, and C. Lucas,“Colonial Competitive Algorithm as a Tool for Nash Equilibrium Point Achievement”. Lecture notes in computer science (2008), 5073, 680-695. [20] H. Sepehri Rad, C. Lucas, “Application of Imperialistic Competition Algorithm in Recommender Systems”. In: 13th Int'l CSI Computer Conference (CSICC'08) (2008), Kish Island, Iran.