
Abistado, K. G., Arellano, C. N., and Maravillas, E. A. Paper: Weather Forecasting Using Artificial Neural Network and Bayesian Network Klent Gomez Abistado∗, Catherine N. Arellano∗∗, and Elmer A. Maravillas∗∗ ∗Advanced World Systems Inc. Cebu City, Philippines ∗∗Department of Computer Science, Cebu Institute of Technology University Cebu City, Philippines E-mail: aklent [email protected], [email protected], [email protected] [Received February 9, 2014; accepted May 25, 2014] This paper presents a scheme of weather forecasting existing methods of weather forecasting give only short using artificial neural network (ANN) and Bayesian time span for which a weather forecast applies [1]. network. The study focuses on the data represent- Researchers mainly in the field of atmospheric science ing central Cebu weather conditions. The parame- attempted to predict the state of the atmosphere in a given ters used in this study are as follows: mean dew point, location for a future time. A lot of ways were utilized minimum temperature, maximum temperature, mean to do the weather forecasting based on the data gath- temperature, mean relative humidity, rainfall, aver- ered from weather instruments, such as the barometer, age wind speed, prevailing wind direction, and mean hygrometer, weather balloon, and radar. Collection of cloudiness. The weather data were collected from the data about the current state of the atmosphere is the ba- PAG-ASA Mactan-Cebu Station located at latitude: sic step. Particularly, data on the (temperature, humidity 10◦19, longitude: 123◦59 starting from January 2011 and wind) and understanding the atmospheric processes to December 2011 and the values available represent (through meteorology) is important in determining how daily averages. These data were used for training the the atmospheric conditions evolve [2]. multi-layered backpropagation ANN in predicting the Information obtained from the instruments is effec- weather conditions of the succeeding days. Some out- tively analyzed using numerical weather prediction. This puts from the ANN, such as the humidity, tempera- method was first proposed by Lewis Fry Richardson in ture, and amount of rainfall, are fed to the Bayesian 1922 [3], though computers with the capability to do such network for statistical analysis to forecast the prob- computations do not yet exist at that time. ability of rain. Experiments show that the system As the computers grow into a more powerful instru- achieved 93%–100% accuracy in forecasting weather ment, using numerical data weather prediction becomes conditions. more eminent. This leads to an essential definition that a model is a computer program that produces meteoro- logical information for future times at given locations and Keywords: artificial neural networks, backpropagation, altitudes [4]. Modern models are contained by the set of bayesian network, weather forecast, PAG-ASA equations, known as the primitive equations, used to pre- dict the future state of the atmosphere [5]. These existing methods basically use a sample state of 1. Introduction the fluid at a given time and use the equations of fluid dynamics and thermodynamics to estimate the state of the Weather condition is very important for everybody. fluid at some time in the future [4]. Though this method Government authorities, businessmen, farmers, security provides us a clear definition, still it does not contain the planners, and a host of interested entities would want to ability to adapt changes and learn from experiences. With know what lies ahead as far as weather is concerned. Cor- these abovementioned factors, the application of artificial rect understanding of weather behavior is a must to be intelligence for weather forecasting becomes an interest able to make plans to prevent damages of catastrophic for the modern technology. proportions and to be able to focus meager resources of Neural network is an effective tool for capturing com- government to areas that will be unavoidably affected. plex relationship between input and output [6]. The con- Inaccurate forecasts bring a lot of problems. Many lives cept of neural network technology is motivated for the de- will be unnecessarily sacrificed and endangered, farm sire that it could perform intelligent tasks similar to those products lost, damage to properties amounting to mil- performed by the human brain. Neural network [7] pic- lions of dollars, can be caused by wrong weather fore- tures a human brain in two behaviors: casts. It cannot be denied that weather forecasts nowa- days have been tainted with inaccuracies. This is because 1) A neural network acquires knowledge through learn- 812 Journal of Advanced Computational Intelligence Vol.18 No.5, 2014 and Intelligent Informatics Weather Forecasting Using ANN and Bayesian Network represent the weather conditions of the following day. The number of hidden neurons is defined as twice the sum of input and output neurons. There are 14 input parameters and 12 output parameters for the network. Each param- eter is presented to the network as a 16-bit binary value. Therefore, the number of neurons on the input layer is Fig. 1. Weather forecasting systems using artificial neural 224, while on the output layer is 192. Therefore, there are network and bayesian network. (224+192)(2) or 832 hidden neurons in the network. 3. Weather Data Preprocessing The inputs to the neural network are weather data ob- tained from the history of weather conditions of Cebu province as gathered by PAG-ASA which situated in Mac- tan, Cebu from January 2011 to December 2011. The val- ues in the data are the daily means of the extreme weather conditions. The output of the network is the weather con- dition of the day following from when the input weather condition was taken. Neurons like to see data in a particular input range to be most effective. If you present data that varies from 100 to 500 will not be useful, since the middle layer of neurons have a Sigmoid Activation function that squashes large in- putstoeither0or+1. In other words, one should choose Fig. 2. Weather forecasting neural network architecture us- data that fit a range that does not saturate, or overwhelm ing backpropagation training algorithm. the network neurons. Choosing inputs from −1to1or0 to 1 is a good idea. By the same token, one should nor- malize the expected values for the outputs to the 0 to 1 sigmoidal range [8]. ing. Cognizant of the abovementioned guidelines, it is de- 2) A neural network’s knowledge is stored within in- cided that each input parameter shall be represented by terneuron connection strengths known as synaptic a bit-string of length 16. Since each of the weather con- weights. dition parameter has maximum and minimum values, an input parameter value shall be assigned a value within the In broad representation, neural networks have the abil- range from 0 to 100000. The actual input value will be ity to represent both linear and nonlinear relationships di- computed using Eq. (1) below. rectly from the data being modeled. Actual input value =((P − P )/(P − P )) This proposed Weather Prediction system using BPN min max min ∗ , Neural Network and Bayesian Network, as shown in 100000 ..... (1) Fig. 1 , was developed and tested using the weather data where P is any parameter value, Pmin is the day’s mini- from PAG-ASA Mactan-Cebu, Cebu, Philippines. mum value of P, and Pmax is the day’s maximum value of P. The resulting actual input value will be converted into a 16 bit binary number. The same will be done to the other 2. Weather Forecasting Artificial Neural Net- input parameters’ values. work (WFANN) Given the values of each input parameter, maxima and minima values of each is also identified. Example for ev- The artificial neural network used in this study was ery month of April, statistics show that the maximum tem- trained using the backpropagation training algorithm, as perature is 33 degrees Celsius with a probability of 0.84 shown in Fig. 2. The inputs to the network are as fol- and minimum temperature is 23 degrees Celsius with a lows: month of the year, day of the month, mean sea probability of 0.7. To get the partial value of the input level pressure, dry-bulb temperature, wet-bulb tempera- parameter for temperature, percentage value is computed. ture, mean dew point, minimum temperature, maximum Using the previous example, maxima is 33 with 0.84 and temperature, mean temperature, mean relative humidity, minima is 23 with 0.7. Get the range with the formula rainfall, average wind speed, prevailing wind direction, maxima – minima. Therefore 33 − 23 is 10. Initial in- and mean cloudiness. The output parameters of the net- put value for an example is 28 degrees Celsius. 28 sub- work are similar to the input parameters except for the tracted by minima which results to 5. 5 divided by the month of the year and the day of the month which are no rangewhichis10thenresultedto0.5.0.5 × 100 is 50. longer necessary since the output values of the network Vol.18 No.5, 2014 Journal of Advanced Computational Intelligence 813 and Intelligent Informatics Abistado, K. G., Arellano, C. N., and Maravillas, E. A. and there is no rain, respectively. The values for humid- ity, temperature, and rainfall are classified into three (3) classes, namely, Low, Medium, and High. The full joint probability distribution of a Bayesian net- work [9] is given by the formula n P(x1,...,xn)=∏P(xi|parents(Xi)) .... (2) i=1 where parents (xi) denotes the specific values of the vari- ables that directly influence xi. Thus, for the Bayesian network shown in Fig. 3, the joint probability distribution Fig. 3. Bayesian network for predicting the chance of is given by rain. There are three independent variables, namely, Humid- ( , , , )= ( | ) ( | ) ( | ) ( ), ity, Temperature, and Rainfall that are directly influenced P R H T RF P H R P T R P RF R P R (3) by Rain.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages6 Page
-
File Size-