Optimizing the Membership Degree of Fuzzy Inference System (FIS) and Fuzzy Clustering Means (FCM) in Weather Data Using Firefly Algorithm

In weather clustering, there are many variables which can be observed such as air temperature, humidity, sunlight intensity, and so on. In this research, Takagi-Sugeno Fuzzy Inference System (FIS) will be used for forecasting the sunlight intensity based on temperature and humidity and Fuzzy Clustering Means (FCM) will be used for clustering them based on fuzzy set. From the data consisting of temperature, humidity, and sunlight intensity, we will forecast sunlight intensity and cluster them into two clusters, three clusters, and four clusters by FCM method. In FIS method, the membership degree are often generated by trial and error. Also, the optimization of the initial of membership degree are required in FCM. Because the initial of membership degree are often generated by trial and error, in this research, we use heuristic method like Firefly Algorithm to optimize the membership degree. From the simulations, Firefly Algorithm can optimize the membership degree of FIS for forecasting the data with minimum Mean Square Error (MSE) and the initial of membership degree of FCM with two clusters, three clusters, and four clusters with minimum objective value.


INTRODUCTION
Weather clustering is important work such as determining hot, warm or cold weather. In weather clustering, there are many variables which can be observed such as air temperature, humidity, sunlight intensity, and so on. From previous research [1], the temperature, humidity, and sunlight intensity have good correlation so that in this research, Fuzzy Clustering Means (FCM) will be used for clustering them based on fuzzy set.
Fuzzy set was introduced by L.A. Zadeh in 1965. The difference of the fuzzy set and crisp set is in which fuzzy set has membership function. There are many applications in fuzzy system: optimization, control, estimation. The application of fuzzy set which can be used on clustring problem is Fuzzy Clustering Means (FCM) [2]. In previous researches, some methods have been applied in clustering problem like K-Means [3], Kohonen Network or Neural Network [4], Genetic Algorithm [5].
Fuzzy Inference System (FIS) is the method for forecasting the data using membership function in their inputs. There are two types of FIS such as Mamdani and Takagi Sugeno. The difference between Mamdani and TS is that TS output membership functions are either linear or constant [12], [13].
Fuzzy C Means (FCM) is the method for clustering the data where each data belongs to a cluster that is specified by membership degree. This method was founded by Bezdek in 1981 [2]. In FCM, we update membership degree so that minimizing the objective function value.
From the data consisting of temperature, humidity, and sunlight intensity, we will forecast sunlight intensity and cluster them into two clusters, three clusters, and four clusters by FCM method. In FIS method, the membership degree are often generated by trial and error.In FCM method, there is the initialization of membership degree randomly between 0-1. Therefore, the optimizations of the initial of membership degree are required. In previous researches, Particle Swarm Optimization (PSO) has been applied in optimizing the initial of membership degree [6], [7]. In this research, we use heuristic method like Firefly Algorithm to optimize the initial of membership degree. The advantages of Firefly Algorithm are they use brightness as attractiveness. The less bright firefly will approach to the brighter firefly. Firefly Algorithm has been applied in some optimization problem such as linear programming with constrains [8].
Xin-She Yang discovered Firefly Algorithm in 2008. It is inspired on behavior of flashing characteristics of fireflies. Theysearch the prey, and find mates by bioluminescence, and communicate. One of characteristics of fireflies is the less bright firefly will approach to the brighter firefly. Brighter firefly indicates better objective function as fitness function [9].
From the simulations, Firefly Algorithm can optimize the initial of membership degree of FCM with two clusters, three clusters, and four clusters with minimum objective value.

Takagi-Sugeno Fuzzy Inference System (FIS)
General form of rule-based fuzzy models are there are antecedent proposition and cause the consequent proposition. Depending on the form of the consequent, the types of rule based fuzzy model are: 1. Linguistic fuzzy model Both antecedent and the consequent are fuzzy propositions 2. Takagi -Sugeno (TS) fuzzy model The antecedent is a fuzzy proposition and the consequent is a crisp function. Suppose the rule is : Then, the fuzzy inference system can be computed as follows : 1. Compute the degree of membership function of two inputs With D is the number of elements of z Takagi -Sugeno (TS) fuzzy inference is introduced in 1985. It is similar to Mamdani method, but the difference between Mamdani and TS is that TS output membership functions are either linear or constant [12], [13]. The rule in a TS fuzzy model has the form: The inference formula of the TS model is as follows:

Fuzzy Clustering Means (FCM)
Clustering is the process to groupthe data into many groups or clusters.The objects in the same cluster have high similarity. The similarities are determinedby the attribute and distance measures [10]. The purpose of clustering is for identifying natural groupings from data set to produce representation of the data [11].
Bezdek found Fuzzy Clustering Means (FCM) in 1981 [2]. FCM is the method for clustering the data in which each data belongs to a cluster that is specified by membership degree. FCM is the minimization of the following objective function in Equation 6.
With the parameters are : The computation of FCM is as follows [10]

Firefly Algorithm
Xin-She Yang discovered Firefly Algorithm (FA) in 2008. It is inspired on behavior of flashing characteristics of fireflies. They search the prey, and find mates by bioluminescence, and communicate. The FA is based on the rules [9]: 1. All fireflies are unisex so they attract one another. 2. Attractiveness is the brightness of firefly. The brightness of a firefly is affected by the objective function () fy. In the FireflyAlgorithm, attractiveness of a firefly is determined by its brightness as objective function.
In FIS, we need to optimize the membership functions because they are often generated by trial and error. Because the membership value depend on parameter of membership function [14], [15], then we use Firefly Algorithm to optimize the parameter of membership function. Suppose that the membership function used is gaussian as in Equation (12).  (13) with Dk is the number of data in rule In FCM, we need to optimize the initial of membership degree with D is the number of data and K is the number of clusters. The algorithm for optimizationusing FA are as follows : b. Computing the attractiveness of firefly  (1 )

RESULTS AND DISCUSSION
Data used are weather data in Jakarta consisting of temperature (Celcius), humidity (%), and sunlight intensity (Watt/m 2 ) during January until July 2012. Figure 1 shows the 3-dimention graph consisting of temperature  From the data consisting of temperature, humidity, and sunlight intensity, we will forecast the sunlight intensity based on temperature and humidity by FIS method andcluster them into two clusters, three clusters, and four clusters by FCM method for proving the performance of FCM.
In both if FIS and FCM method, there are the initialization of membership degree randomly between 0-1. Therefore, the optimizations of the membership degree are required. In FIS method, before the simulation is applied, the temperature, humidity, and sunlight intensity data are normalized between 0.1 to 0.9. When the forecasting result are obtained, we de-normalize the data.
The research, we use Firefly Algorithm to optimize the initial of membership degree. The parameters of Firefly Algorithm used are with the number of fireflies are 20 and maximum iterations are 30.

Forecasting the Data
The Firefly Algorithm optimization process can be seen in Figure 2. At the early, the position of fireflies are random so that the fitness function is relative large. In the optimization, the brightness of fireflies is updated to the brighter firefly with minimum fitness function. The optimalparameter of membership degree are : with mean square error (MSE) as objective function is 816.4335. And the optimal parameters of rules computed by Least Square Estimation (LSE) are in Table 1, with i p is the i-th rule coefficient of temparature, i q is the i-th rule coefficient of humidity, i r is the constants.  After the optimalparameter of membership degree are obtained, they will be used in FIS simulation. Figure 3(a) show the optimal membership function of temperature data with three types of gauss membership function such as small, medium, and large and figure  3(b) show the optimal membership function of humidity data with three types of gauss membership function such as small, medium, and large. Figure 4 shows the forecasting result of sunlight intensity based on temperature and humidity.

Clustering into Two Clusters
The Firefly Algorithm optimization process can be seen in Figure 5. At the early, the position of fireflies are random so that the fitness function is relative large. In the optimization, the brightness of fireflies is updated to the brighter firefly with minimum fitness function. The optimal initial of membership degree ij  are obtained with minimum objective function in one cycle as minimum fitness is 286094. After the optimal initial of membership degree are obtained, they will be used in FCM simulation until 100 iterations with optimized objective value is 176534. Figure 6 shows the convergence process of FCM into two clusters. Figure 6(b) shows the plot of temperature, humidity, and sunlight intensity data after clustering into two clusters with different colors.
(a) (b) Figure 6. (a) Convergence process of FCM into two clusters. (b) The plot of temperature, humidity, and sunlight intensity data after clustering into two clusters

Clustering into Three Clusters
Similar process can be seen in Figure 7. The optimal initial of membership degree ij  are obtained with minimum objective function in one cycle as minimum fitness is 281248. After the optimal initial of membership degree are obtained, they will be used in FCM simulation until 100 iterations with optimized objective value is 125442. Figure 8(a) shows the convergence process of FCM into three clusters. Figure 8(b) shows the plot of temperature, humidity, and sunlight intensity data after clustering into three clusters with different colors.

Clustering into Four Clusters
Similar process can be seen in Figure 9. The optimal initial of membership degree ij  are obtained with minimum objective function in one cycle as minimum fitness is 288235. After the optimal initial of membership degree are obtained, they will be used in FCM simulation until 100 iterations with optimized objective value is 90865. Figure 10(a) shows the convergence process of FCM into four clusters. Figure 10(b) shows the plot of temperature, humidity, and sunlight intensity data after clustering into four clusters with different colors.

CONCLUSIONS
Takagi-Sugeno Fuzzy Inference System (FIS) can be used for forecasting the sunlight intensity based on temperature and humidity and Fuzzy Clustering Means (FCM) can be used for clustering them based on fuzzy set. From the data consisting of temperature, humidity, and sunlight intensity, we will forecast sunlight intensity and cluster them into two clusters, three clusters, and four clusters by FCM method. In FIS method, the membership degree are often generated by trial and error. Also, the optimization of the initial of membership degree are required in FCM. Because the initial of membership degree are often generated by trial and error, in this research, we use heuristic method like Firefly Algorithm to optimize the membership degree. From the simulations, Firefly Algorithm can optimize the membership degree of FIS for forecasting the data with minimum Mean Square Error (MSE)and the initial of membership degree of FCM with two clusters, three clusters, and four clusters with minimum objective value.Clustering by four clusters results the smallest objective value.
The developments of this research are classifying the data with larger dimentions so that resulting maximum accuration or minimum error.