{'fraction_non_alphanumeric': 0.029668831689519684, 'fraction_numerical': 0.018763531392831368, 'mean_word_length': 5.116723884256989, 'pattern_counts': {'":': 0, '<': 1, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Prediction Scheme for Daily Maximum and Minimum Temperature Forecasts Using Recurrent Neural Network and Rough set

A new nonlinear objective prediction scheme has been developed for predicting 24h daily maximum and minimum temperature forecasts at 14 stations in Guangxi, China during Jan, 2015-Jun, 2018 using Recurrent Neural Network (RNN) and based on the daily average, maximum, minimum temperature and precipitation data. Taking the climatology and persistence predictors as primary factors, the conditional attribute reduction method of rough set theory is adopted. By eliminating the unrelated attributes, the predictors direct correlated with the predictand (maximum and minimum temperature) are taken as the RNN model input by means of attribute reduction. This new scheme is validated with 24h short-range forecasts spanning Jan to Jun, 2018. Using identical predictors and sample cases, predictions of the RNN model are compared with the stepwise regression method, and results show that the former is more accurate. The mean absolute errors of RNN at 14 stations in Guangxi are lower than those of the stepwise regression method. The mean forecast accuracy with absolute errors being less than 2°C (1°C) of RNN is higher than that of the stepwise regression method. Moreover, the number of forecast errors larger than 2°C and the system deviation of daily maximum (minimum) temperature prediction are significantly reduced by RNN model, indicating a potentially better operational weather prediction tool.


Introduction
Temperature forecast has always been an important part of the weather forecast. In recent years, due to the impact of global climate change, extreme weather is frequently occurred [1]. People's demand for weather forecast is higher and higher, especially to extreme temperature forecast (maximum and minimum temperature). It is the key research topic in atmospheric sciences.
Temperature forecast have been continuously developed for nearly a hundred years since the birth of weather forecast. At first, temperature forecast was based on the forecasters' analysis of the weather situation and extrapolation of temperature observation. At present, numerical prediction, ensemble forecast and various mathematical physics methods are applied to temperature prediction [2][3][4]. Overall, the prediction experiments of these forecast methods have achieved better prediction results. However, it is still a complex scientific problem for temperature forecast to reach the requirement of higher forecast accuracy.
Based on the average, maximum, minimum temperature and precipitation at 14 stations in Guangxi, China, the climatology and persistence predictors reflecting the movement characteristics of temperature in Guangxi, China are been calculated. By adopting the conditional attribute reduction method of rough set theory for selecting the optimal predictors as model input, an objective prediction

Prediction object
The data used in this paper is the average, maximum, minimum temperature and precipitation at 14 stations from Jan, 2015 to Jun, 2018 in Guangxi, China. The 14 stations are Fangchenggang, Nanning, Chongzuo, Liuzhou, Laibin, Guilin, Wuzhou, Hezhou, Yulin, Guigang, Baise, Qinzhou, Hechi, Beihai, respectively. The maximum and minimum temperature data from 14 stations spanning Jan, 2015 to Jun, 2018 in Guangxi are taken as the prediction object with 2004 samples. The data from 2015 to 2017 contain 1823 relevant samples for prediction modeling, and the data from Jan to Jun, 2018 include 181 samples for independent samples.
Temperature is a sensitive meteorological element. Its changes depend on the heat budget and the increase or decrease in heat storage, also are affected by region. As a result, in order to avoid the influence of different regions on temperature, 24h maximum and minimum temperature forecast models of 14 stations are built for each station. By finding different kinds of motion characteristics affecting temperature changes in different regions (stations), temperature models are ensured to have better forecast results in the actual forecast period.

Predictor calculation
Based on the climatology and persistence (CLIPER) method [5], the historical activities' rules and the various movements' characteristics at initial moments and previous days of the maximum and minimum temperature in Guangxi are analysed to scientifically select climatology and persistence factors that affect temperature changes. In this paper, the selected CLIPER predictors contain average, maximum, minimum temperature and precipitation in the previous days and their change rules, and a total of 50 CLIPER predictors are obtained for temperature forecast (Limited space, Table for specific factors is omitted). Further, attribute reduction is conducted for these 50 primary factors by adopting the conditional attribute reduction method of rough set theory. By eliminating the weak correlated attributes, the predictors direct correlated with the maximum (minimum) temperature are taken as the model input for improving the prediction effect.
The rough set was proposed by Pawlak Z. in 1982 [6]. Its main idea is to obtain the decisionmaking features or classification rules for problems by keeping the classification ability unchanged and using knowledge reduction. At present, the rough set theory has been applied successfully in many disciplines [7][8].
In this paper, by calculating the importance of a single attribute and based on the improved discernibility matrix [9], an algorithm for selecting factors for maximum (minimum) temperature prediction has been developed. By removing the unnecessary information from the decision table, and gradually increasing essential attribute, the core value core (C) of the conditional attribute of the decision-making rule is computed. The calculation process of attribute reduction for the minimal attribute set R is as follows: (1) Discretize the continuous attribute in the primary decision-making table, and remove the duplicate examples from the decision-making table.
(2) Compute the core value core(C) of the conditional attribute set C by means of the improved differential matrix in reference [9].
(4) Compute the attribute importance S a for each attribute aA, and select the attribute a with the maximum S a in set A. Set R=R∪{a}, and remove the attribute a from set A.  (5) If γ R (L)<γ C (L) , return to step (4), otherwise go to step (6). (6) Output R. R is the relative reduction of the conditional attribute set C. According to the reduction of conditional attributes in the rough set theory, about 8-9 rough set factors are employed as the temperature model input for RNN model.

Principle for Recurrent Neural Network Model
Temperature change has the characteristic of obvious nonlinearity, transition and abrupt change, while neural network method has strong ability to deal with nonlinear problems; as a result, Recurrent Neural Network (RNN) is adopted for temperature prediction in order to be able to improve the forecast accuracy. In recent years, the gradient vanishing problem in RNN has been solved by using Long Short-Term Memory (LSTM), RNN has rapidly developed to be a popular deep learning network, and achieved great success in many disciplines [10][11].
RNN is a kind of deep learning network based on sequence [12]. The difference between RNN and traditional neural network (NN) is that there is a connection between hidden layers in RNN. That is the important reason for traditional NN being weak in the time series prediction. The calculation process for RNN can be described by the Equation (1) and (2). ) ( (1) is the calculation equation of hidden layer. The hidden layer is a circular layer. x t denotes the input variable at t time; s t designates the output of the hidden layer at t time; U denotes a weight matrix from input layer to hidden layer, while W denotes the weight matrix from hidden layer to hidden layer. Equation (2) is the calculation equation of output layer. The output layer is a fully connected layer. Neurons in the hidden layer are all connected with all neurons in the output layer. V denotes the weight matrix from hidden layer to output layer. f 1 and f 2 is the activation function. The training algorithm of RNN is Backpropagation Through Time (BPTT) algorithm. It mainly consists of four steps [12]: (1) Forward compute the output of each neuron in the network.
(2) Back compute the error of each neuron in the network between the predicted values and observations.
(3) Calculate the gradient of each weight in the network. (4) Update weights using gradient descent method.

Temperature prediction model based on RNN model combined with rough set
For the maximum and minimum temperature prediction model at 14 stations in Guangxi, China, the data from 2015 to 2017 is used for prediction modeling, and the data from Jan to Jun, 2018 is used for independent samples. By adopting the conditional attribute reduction method of rough set theory, 8-9 temperature factors are selected from 50 CLIPER predictors for RNN model input in predicting maximum and minimum temperature. In the RNN computation, we specified the number of neurons in the hidden layer is 10.
In terms of forecast evaluation, the mean absolute error and forecast accuracy are used in practical weather prediction, defined as: Nr TT (4) Equation (3) and (4) is the forecast absolute error and forecast accuracy for the maximum and minimum temperature prediction, respectively. Where N is the number of predictions; F and O is the N rK and N fK is the number of correct forecasts and total forecasts, respectively. Table 1 gives the forecast accuracy by using RNN for 24h temperature prediction of 181 independent samples in Jan-Jun, 2018 at 14 stations in Guangxi. Results show that the forecast accuracy of RNN model combined with rough set is 62% (35%) for 2℃ (1℃) in maximum temperature prediction, and 80% (50%) for 2℃ (1℃) in minimum temperature prediction, achieving better prediction results (Table 1 and Table 2).

Performance analysis of the RNN prediction model
In order to analyse the influence of RNN model combined with rough set theory on temperature forecast, stepwise regression method has been adopted to build the prediction equation. It is objective and contains no tunable parameters. For objective comparison and analysis, stepwise regression method for the daily maximum and minimum temperature prediction in Jan-Jun, 2018 at 14 stations in Guangxi was developed based on the 50 CLIPER predictors and under the same sample cases. By controlling the F value, the number of selected factors for stepwise regression equation is also about 8-9. The results are shown in Table 2.  Table 2 show that although the modeling samples and independent samples of RNN model and stepwise regression method are identical, the prediction ability of RNN model combined with rough set is clearly higher than that of the traditional stepwise regression method for temperature forecast. The mean forecast accuracy of 24h temperature prediction in stepwise regression method is 58% (33%) for 2℃ (1℃) in maximum temperature prediction, and 75% (45%) for 2℃ (1℃) in minimum temperature prediction, which are lower than those in RNN model combined with rough set. Moreover, the mean absolute errors of stepwise IOP Conf. Series: Earth and Environmental Science 237 (2019) 022005 IOP Publishing doi:10.1088/1755-1315/237/2/022005 5 regression method for 24h temperature prediction are also higher than those of RNN mode. Thereby, the RNN model combined with rough set is stable and reliable, and it can be applied in operational weather prediction.

Summary
The temperature prediction is influenced by the comprehensive factors such as thermodynamics, dynamics and water vapor conditions of the atmospheric motion, and has obvious nonlinear characteristics. Hence, temperature forecast is a difficult problem. The new developed RNN model combined with rough set in this paper has strong ability for dealing with nonlinear problems, and its prediction accuracy is higher than that of the traditional linear method. The developed RNN model only requires the previous historical data, and does not affected by data missing. It also does not require manual intervention and is convenient for forecasters. The RNN model provides a good way for the application of deep learning method in weather forecast and merits further exploration.