Comparison between Neural Network (NN) and Adaptive Neuro Fuzzy Inference System (ANFIS) on sunlight intensity prediction based on air temperature and humidity

Weather prediction expecially in predicting sunlight intensityhas important role in energy usage. As effort for controlling petrol-based fuel usage, government manage energy usage by converting solar energy from sunlight intensity to electric through solar cell.Sunlight intensity depends on air temperature and humidity. Two methods on prediction process will be applied : Neural Network (NN) and Adaptive Neuro Fuzzy Inference System (ANFIS). Type of NN used in prediction process is Backpropagation. Backpropagation consists of forward propagation, backward propagation, and update weight matrices. ANFIS uses hybrid method to train consequent parameters and premise parameters. In this research, NN will be compared with ANFIS. From five trials of NN simulations, the number of maximum epoch for making the root of mean square error(RMSE) in training data is very large so that the computation time is very long. From the comparison result of two methods, we can see that ANFIS can make faster prediction than NN with the number of maximum epoches is smaller than NN so that computation time is faster.


Introduction
Weather prediction is important work for some activities. In weather prediction, there are many conditions which can be observed such as air temperature, humidity, sunlight intensity, and so on. Weather prediction expecially in determining sunlight intensity is important work in energy usage. According data from Energy and Mineral Resources Ministry during year 2005-2010, the number of consumed fuel in Indonesia is more than the number of produced fuel. This problem causes government to import the fuel. As effort for controlling petrol-based fuel usage, government manage energy usage by converting solar energy from sunlight intensity to electric through solar cell [13]. This research will compare two methods for weather prediction, such as Neural Network (NN) and Adaptive Neuro Fuzzy Inference System (ANFIS).
Neural Network (NN) was introduced by McCulloch and Pitts in 1943. NN work resembles to human neuron system. Type of NN used in prediction process is Backpropagation. Backpropagation consists of forward propagation, backward propagation, and update weight matrices. In forward propagation, some calculations using activation function start from input, hidden layer, and output respectively. In backward propagation, error factor calculations are applied from output, hidden layer, and input respectively. After that, update weight matrices [4].
The applications of fuzzy logic have been applied, such as for clustering the data [8] and forecasting [1,2]. Adaptive Neuro Fuzzy Inference System (ANFIS)is the network which uses supervised learning algorithm. It has a similar function to the Takagi-Sugeno fuzzy inference system model. In addition, adaptive network has the architecture characteristics that consists a number of adaptive nodes. Every node has different functions and the output is affected from the signals and parameters [2]. ANFIS uses hybrid method to train consequent parameters and premise parameters [1].
In previous research, forecasting methods for prediction have been applied by exponential smooting [5], Kalman Filter [6,7]. NN expeciallyBackpropagation has been applied in weather prediction [9,10,12]. This algorithm is applied in training data and testing data with certain proportion [11]. In this research, Backpropagation will be compared with ANFIS. From five trials of NN simulations, the number of maximum epoch for making the root of mean square error (RMSE) in training data is very large so that the computation time is very long. From the comparison result of two methods, we can see that ANFIS can make faster prediction than NN with the number of maximum epoches is smaller than NN so that computation time is faster.

Neural Network
Neural Network (NN) was introduced by Mc Culloch and Pitts in 1943. NN works resemble to human's neuron like : a. The signal is travelled between neuron through connector. b. Connectors have weight which will either increase or decrease signal. c. To determine output, neuron uses activation function applied in the sum of input received. In NN, activation function is used for determining output of neuron. Argument of activation function is linear combination of input and weight as in equation (1).
Generally, the properties of activation function are : continuous, differentiable, and not descending function (Fausett, 1994). In this research, activation function applied is binary sigmoid with range (0-1) as in equation (2).

Backpropagation Structure
Backpropagation is type of NN used in prediction process. Backpropagation consists some inputs

Backpropagation Algorithm
The algorithm of Backpropagation can be explained as follows : Initialization weight matrices V and W with random number between -0.5 to 0.5.
1. For each input receives signal and continues to each hidden layer through forward propagation in equation (3) until equation (6) and backward propagation in equation (7) until equation (11). Forward Propagation

Calculating all outputs in output
Backward Propagation 4. Calculating factor  output based on error in each output 6. Calculating factor  hidden layer based on error in each hidden layer Computing the root of mean square error(RMSE)

Adaptive Neuro Fuzzy Inference System (ANFIS)
Adaptive Neuro Fuzzy Inference System (ANFIS) architecture is the network which uses supervised learning algorithm. It has similar function to the Takagi-Sugeno fuzzy inference system model. Figure  2 shows the diagramof ANFISwhich consists of five layers [1].
Given two inputs x and y , and one output f . Suppose rules applied are :  Figure 2. ANFIS structure Layer 1. In this layer, each node adapts to a function parameter. The output in each node is thedegree of membership valuefrom the membership functions.
, of membership function are premise parameters.
Layer 2. In this layer, every node represents the firing strength from given rule. The output node is the result of multiplying of signal and it is delivered to the next node.
Layer 3. Every node is ratio between the i-th firing strength and the total of firing strengths. This result is called the normalized firing strength.
Layer 4. Every node is function defined as :

Hybrid Method
Hybrid method was proposed by Jang in 1993 to train consequent parameters and premiseparameters. There are two parts of hybrid method : forward path and backward path [4]. In forward path, signals travel until layer 4 and the consequent parameters are computed by the least square estimation (LSE). In backward path, the error rates travel backward and the premise parameters are computed by the gradient descent. One level of hybrid method is called epoch.Hybrid methodcombining LSE and gradient descentcanresultfaster convergencerate than Backpropagation method [1,2].

Optimization on Premise Parameters
Generally, in the node ( , ) ki can be computed using chain rule as in equation (22) 1 If  is the premise parameter of network, then the chain rule is like in equation (23)  Update premise parameters usingequation (25) and equation (26).
With  is the learning rate.

Optimization on Consequent Parameters
Optimization on consequent parameters use Least Square Estimation (LSE). Suppse linear combination of output is : For N training data can be constructed to become linear equations system and they can be modified to become matrix system AY   :

Simulation Results
Dataset are taken from weather condition in one city of Indonesia during January-July 2011 (200 days).The simulations will compare two methods : Neural Network (NN) and Adaptive Neuro Fuzzy Interface System (ANFIS) with the parameter provided. Both NN and ANFIS, we use five trials with NN uses five different initial weights and ANFIS uses five different membership functions.

The Correlation of Data
The dataset consist information about air temperature (Celcius), humidity (%), and sunlight intensity (Watt/m 2 ). To determine input and output, we apply data regression and correlation to recognize the relation of data [3]. From the simulation on figure. 3, we obtain that air temperature has positive

Data Partition
Before applying prediction process, we need to split the data into training data and testing data. Data partition used is as follows : for training data, data used have proportion 80% of all data while for testing data, data used have remaining proportion (20% of all data) [3]. Figure 4 shows the data partition where red plus marks represent distribution of testing data. The simulation of NN can be seen on figure 5, figure 6 and figure 7. First, initialization weight matrices and apply to training data using Backpropagation until maximum epoch and the convergence process can be seen at figure 5. It seems in the early epoch, the RMSE resulted is quite large. In the optimization, the RMSE is gradually decreased and converged. Figure 6 shows simulation on training data. Then, optimal weight matrices are applied to testing data. Figure 7 shows simulation on testing data.  We repeat the simulationsusing different initial weights and the results are in table 1. The simulation of ANFIS can be seen on figure 8, figure 9, figure 10 and figure 11. There are three membership functions used where blue curve represents 'small', green curve represents 'medium', and red curve represents 'large'. Figure 8 shows optimized membership functions of input air temperature and input humidity. Each of membership function uses generalized bell (gbell) having three parameters as nonlinear parameters. Figure 9 shows convergence process of RMSE. Figure 10 shows prediction result (sunlight intensity) on training data. Figure 11 shows prediction result (sunlight intensity) on training data.

Conclusion
Both NN and ANFIS can make prediction approaching target. Simulations are applied by splitting dataset into training data (80%) and testing data (20%). From five trials of NN simulations, the number of maximum epoch for making RMSE in training data is very large so that the computation time is very long. The average RMSE in training data is 30.564. From the comparison result of two methods, we can see that ANFIS can make faster prediction than NN with the number of maximum epochs is smaller than NN so that computation time is faster. The developments of this research are making prediction based on more than two input variables and classifying the results by data mining technique.