{'fraction_non_alphanumeric': 0.03153393907001603, 'fraction_numerical': 0.013285485225624189, 'mean_word_length': 4.752305665349144, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Investigating the performance of ANFIS model to predict the hourly temperature in Pattani, Thailand

The aims of this study are (i) to investigate the performance of adaptive neuro-fuzzy inference system (ANFIS) model for predicting hourly temperature in Pattani, Thailand, and (ii) to compare its performance with statistical methods by using root mean square error (RMSE) and mean square error (MSE) as tools to evaluate. The observation data used in this study are from automatic weather station (AWS) in Pattani, Thailand, collected during January, 18th 2014 to January, 18th 2015 (in total 8,640 data series). The data will be separated into training and checking data sets (ratio 70% for training and 30% for checking dataset). ANFIS can optimize the performance of fuzzy model by tuning the parameter in membership function. In ANFIS method, the model will combine the learning capabilities of a neural network and reasoning capabilities of fuzzy logic in order to increase predicting ability. The ANFIS model has been built by using seven of the generalized bell-shaped membership functions with the linear output. The statistical techniques for time series forecasting used in this study are ARIMA and Exponential Smoothing which are powerful model and general used for time series forecasting. Results showed that ANFIS model had smaller RMSE and MSE than other models.


Introduction
Time series is generally represented in various types of data such as those in economics, transportation, climate, hydrology, etc. [1]. Temperature is a part of the environmental system. Temperature can provide effects in any field such as chemical reaction, human health, human activity, etc. According to Svec and Stevenson [2], the awareness of temperature risk has enhanced the effective weather need for hedging and risk management programs and controlling weather derivatives. Schemes for hourly temperature forecasting have been mainly developed in the context of short-or long-term load forecasting and power utility management.
Nowadays, forecasting activities have an important part in our daily life. The temperature forecasting will be indicated for making decision and planning. We can prevent a deep damaged by forecasting, for instance, the coming of storms or typhoons. Eynard et al. [3] stated that the complex variations of temperature and the plenty of historical data suggested by the computational intelligence data-based techniques would be appropriate models to predict temperature. It may be impossible to make a forecast with 100% accuracy. However decreasing the forecasting errors or increasing the speed of the forecasting process may improve the accuracy.
To solve the forecasting of temperature problems, many researchers have constructed many different methods or models. Chen  Predicting temperature is one of the most interesting topic among predicting time series analysis. Researchers are competing to improve the performance of predictive models. But, it is quite hard to find the study of predicting the temperature in Pattani, Thailand. ANFIS (adaptive neuro-fuzzy inference system) had been applied in many fields such as predicting, classifying, controlling, recognition and diagnosis. According to Pahlavani and Delavar [9], the integrating neural network and fuzzy systems can be fused with the learning capability of neural network in expression function of fuzzy inference system. Thus, ANFIS can optimize the performance of fuzzy model by tuning the parameter in membership function. Optimization technique can improve the performance of model [10]. The goals of this paper are applying the adaptive neuro-fuzzy inference system (ANFIS) for predicting the hourly temperature in Pattani, Thailand, and evaluating the ARIMA (Autoregressive Moving Average) and exponential smoothing techniques using root mean square error (RMSE). According to Wutsqa et al.
[11], the exponential smoothing and ARIMA are kinds of simple model which can be applied for predicting.

Adaptive Neuro-Fuzzy Inference System (ANFIS)
The pioneer of ANFIS is J.S. Roger Jang in 1992. The ANFIS is a new kind of neural network which is a combination of fuzzy logic and neural network [12]. The ANFIS is a kind of multilayer feedforward network [13]. The ANFIS constructs a fuzzy inference system (FIS) where the membership function parameters are optimized by using a neural network. According to Tarno et al. [13], the ANFIS provides four types of membership functions which will be identified by the fuzzy inference system, i.e. triangular membership function, trapezoidal membership function, Generalized Bell membership function, and Gaussian membership function. The ANFIS provides a tool for the fuzzy model for the data set data tuning the membership function parameters to achieve best model. The learning methods used in the ANFIS are a backpropagation algorithm and a hybrid algorithm. Figure 1 shows the typical architecture of ANFIS. For instance, the ANFIS has two inputs ( , ) and one output ( ). Suppose that fuzzy if-then rules of Takagi and Sugeno's type [14] as follows (1) If is 1 and is 1 , then 1 = 1 + 1 + 1 , (2) If is 2 and is 2 , then 2 = 2 + 2 + 2 , where is 1 and is 1 ; is 2 and is 2 : the premise (nonlinear) section, 1 = 1 + 1 + 1 ; 2 = 2 + 2 + 2 : the consequent (linear) section, 1 , 2 , 1 , 2 , 1 , 2 : the linear parameters, 1 , 2 , 1 , 2 : the non-linear parameters. . Layer 1 (Fuzzy layer) Each node in the fuzzy layer is the degree of membership function ( ( )) from input.

ANFIS architecture
Layer 2 (Product Layer) Every node in this layer is a circle node which multiples from the incoming signal. Fuzzy operator AND is applied in this step in order to get the product out. For examples, is the firing strength of of − th rule in the second layer, ( ) is the degree of membership function fuzzy sets , ( ) is the degree of membership function fuzzy sets . Layer 3 (Normalized Layer) Each node in this layer is a circle node. In the third layer, it will be calculated by normalized firing strengths which is computed by the ratio of the firing strength of − th rule to the sum of all firing strength rules as follow ̅̅̅ = 1 + 2 , = 1,2.
The normalized firing strength is the output of this step. Layer 4 (De-fuzzy Layer) Each node in this layer is a square node or called an adaptive node. The output of this step can be calculated as this function is an output of ANFIS, and are the inputs of ANFIS, { , , } is the parameters set (consequent parameters).
Layer 5 (Total Output Layer) In the fifth layer, the single node will calculate the overall output as the summation all of the incoming signals from the previous layer.

Learning algorithm of ANFIS
The learning process in the ANFIS is the changing parameters set of membership function in order to get the optimal parameters and solutions [13]. The adaption of the premise and consequent parameters is the optimization way in the ANFIS. The parameters are tuned to decrease the error which is the summation of the squared difference between the output and observation values.
There are two kinds of ANFIS learning algorithms which are backpropagation and hybrid algorithms. In this study, the hybrid algorithm will be applied. However, according to Jang [15] in the ANFIS, there is a more efficient method which is hybrid learning method. A hybrid algorithm is a combination of backpropagation and least square method. According to Jang [15], in the hybrid algorithm, premise parameters will backward pass the network and consequent will forward pass the network. In a forward way, least square method will identify the consequent parameters when the input passed into layer 4. Another way, backward step, gradient descent will identify the premise parameters.

Methodology
According to Tarno et al. [13], there are three main steps to construct ANFIS which are preprocessing data, establishing the rules, and evaluating the performance. The implementation of ANFIS for forecasting temperature in Pattani, Thailand can be described as follows: 1. Data collection The data are obtained from Automatic Weather Station (AWS) in Pattani, Thailand, and collected from January, 18th 2014 to January, 18th 2015 (in total 8,640 data series).

Preprocessing data
The observation values faced some missing data. Imputation method is a tool to fix this problem. Imputation method is replacing the missing values by some means from the previous time period. After fixed missing data, the data are separated into two groups, training and checking. According to Dobbin and Simon [14], the optimal proportion of training dataset is within range 40%-80%. The best proportion for splitting datasets commonly used 1/2 training or 2/3 training. This study used 70% data for training and 30% data for checking. The plot of the preprocessed data which have no missing data and ready for analyzing are shown in Figure 2.

Input selection
In this study, it will be considered two inputs to get output. The number of input has been determined based on significant lags of autocorrelation function (ACF).

Determining the membership function
After examining the process, the ANFIS model produces seven generalized bell functions (gbellmf) with linear output as shown in Figure 3.  The hybrid method is selected to learn the model. The architecture of ANFIS model in this study can be seen in Figure 4. In this model, fuzzy layer is represented by input, product layer is represented by inputmf, normalized is represented by rule, defuzzy layer is represented by outputmf, and total output layer is represented by output. 7. Tuning the parameters of the fuzzy inference system The parameters set had been estimated in this step. Fuzzy inference system is used for reasoning rule to get the fuzzy output. The training data set has been run 1000 epochs in order to get the smallest error or optimal solution. Figure

Forecasting and evaluating the performance
After achieving the significant model, the predicted values from training and check data will be calculated and then used to calculate the mean square error (MSE) and root mean square error (RMSE) as follows: where is the number of predicted data, is the time step (hourly). Once, the ANFIS model has been constructed, the ARIMA and Exponential Smoothing methods will be implemented to construct the statistical forecasting model in order to compare the performance with ANFIS. Figure 6 shows strong linear relationship between the target and the output in the scatterplot of the ANFIS model. This indicates that the model could fit to the data. The ANFIS seems to be predictive model for predicting temperature in Pattani, Thailand. Table 1 shows the evaluation results for all of models with checking data. The evaluation results show that the ANFIS model has the smallest value of RMSE and MSE. Definitely, the ANFIS model has the highest value of correlation. It is indicated that the ANFIS model can performs better than other statistical models. Figures 7, 8 and 9 show the time series plot of the checking data for ANFIS, ARIMA, and simple exponential smoothing forecasted, respectively. Figures 7 and 8 show that there were no different for ANFIS and ARIMA models. Because the prediction results is quite similar. And the evaluation value has little differences. Fig. 9 shows that the performance of simple exponential smoothing is not as good as other models, since the forecasting results are almost constant number in interval [26,29]. The ARIMA is a kind of classical forecasting method which can gain good results. The ANFIS as computational artificial intelligence data-based technique can be the best predictive model in this study.

Conclusion
The aims of this study are to investigate the performance of adaptive neuro-fuzzy inference system (ANFIS) model for forecasting hourly temperature in Pattani, Thailand, and to compare its performance with statistical methods (ARIMA and Exponential Smoothing) by using root mean square error (RMSE) and mean square error (MSE) as a tool for models evaluating.. The procedures to construct the ANFIS are collecting data, pre-processing data, selecting input, determining membership function, generating fuzzy rules, training fuzzy inference system, and forecasting.
In this study, the observations value has been separated into two groups which are 70% training and 30% checking data. The accuracy of the ANFIS model is influenced by many factors such as the number of the membership function, the type of membership function, the selection of input, the number of iteration, and the type of output. According to the result of this study, the ANFIS model has been constructed with seven of the generalized bell membership function (gbellmf). And the optimal ANFIS model has been compared with ARIMA and exponential smoothing methods. The result stated that the ANFIS has a smaller error than statistical methods which is 0.3250 for RMSE and 0.1057 for MSE. For particular result in this study, it can be concluded that ANFIS is able to predict more accurately than another methods. 9 1234567890 ''""