Introduction

Currently, weather forecasting is in high demand for several applications in agriculture, air traffic services, floods, energy and environment control. Weather forecasting is an expectation of what the weather will resemble in next 1 h, tomorrow, or 1 week from now. It includes a combination of models, perceptions, and learning of patterns with precedents (Saba and Rehman 2012; Norouzi et al. 2014). By utilizing these techniques, sensible exact estimates could be made up to 7 days ahead. There are assortments of end users to weather estimates. Weather notices are vital figures since they are utilized to secure life and property. Figures in view of temperature and precipitation are essential to planning and survive. Temperature conjectures are utilized by service organizations to gauge request over coming days. On an ordinary premise, individuals utilize weather conjectures to figure out their clothes. Additionally, open air exercises are seriously abridged by substantial rain, snow and wind chill, estimates could be utilized to arrange exercises around these occasions, to prepare and survive.

Neural Networks has numerous applications in real life for machine vision and to search suitable solutions as compared to the traditional numerical models. For instance, currently, neural networks are employed in documents analysis and recognition (Rehman and Saba 2014; Neamah et al. 2014; Alkawaz et al. 2016), flood control (Joorabchi et al. 2007; Saba 2016), biometrics classification (Rehman et al. 2014; Saba et al. 2014), stock market, weather forecasting and rice yield forecast (Phetchanchai et al. 2010; Elsafi 2014). Recent research exhibits that neural networks are promising non-linear tools if proper training and testing is conducted as well attention is given to learning parameters. The neural network is not rule-based on expert systems rather it is computational intelligence to classify and generalize the relationship between a set of inputs and outputs. While most neural-system-based climate expectation tests have been led by meteorologists or climate specialists, there is a lot of debate encompassing the estimation from the earlier information in deciding indicator factors (Saba and Rehman 2012). Some exploration proposes that there are three ways to deal with indicator driven determining that require plunging levels of space information: physical/numerical demonstrating of atmosphere, experimental displaying utilizing recorded datasets and area from the earlier information to pick reasonable indicators, and utilizing measurable methods to pick appropriate indicator factors (Saba et al. 2011; Fadhil et al. 2016). It appears that most research experimentation receives one of the initial two methodologies. In any case, as a rule, fusing from the earlier climate learning is not attainable on the grounds that it is extremely hard to measure earlier information of climate forms as a contribution to a neural system (Elarbi-Boudihir et al. 2011; Saba et al. 2011).

Literature is replete with different strategies for weather forecasting using different machine learning techniques and statistical models (Saba et al. 2014; Joudaki et al. 2014). Research in (Radhika and Shashi 2009; Malik et al. 2014) employs support vector machines (SVMs) and multilayer perceptron with back-propagation learning algorithm for weather forecasting. However, short-term weather forecasting results were exhibited. Smith et al. (2007) focused on generating neural network models with diminished normal forecast mistake by expanding the quantity of unmistakable perceptions utilized as a part of preparing, including extra info terms that depict the date of a perception, expanding the span of earlier climate information incorporated into every perception. Models were made to gauge air temperature at hourly interims from 1 to 12 h ahead. Each neural network show, having a system design and set of related parameters, was assessed by instantiating and preparing thirty arranges and ascertaining the mean square error (MSE) of the subsequent systems. Arvind Sharma et al. (2007) clarifies how distinctive connectionist ideal models could be planned utilizing distinctive learning techniques and afterward explores whether come out with output (Shrivastava et al. 2012). Saba (2016) concentrated about manufactured neural system utilizing back-propagation neural network (BPN) system for flood prediction (Saba et al. 2012).Hayati and Mohebi (2007) proposed a three-layer MLP coordinate with six hidden neurons, a sigmoid exchange work for the shrouded layer and an unadulterated direct capacity for the output layer was found to produce acceptable weather forecasting. A completely associated, feed forward three layers MLP arrange for temperature forecasting is proposed in (Santhosh Baboo and Kadar Shereef 2010). The main selected features are climatic weight, air temperature; relative dampness, wind speed and wind bearing features are selected. The preparation is done by the back spread. The forecasts are limited by an upper bound, which can be considered as lessening the transferability to different areas. The greater part of the methodologies specified above utilizes MLP systems. Caltagirone (2001) utilizes transformative neural organizes in a blend with non-specific calculations to foresee the greatest temperature every day. A few researchers also proposed hybrid models but included several individual structures such that hybrid model is too complex and slow (Maqsood et al. 2004).

This paper presents a hybrid neural model that is a combination of MLP and RBF and is based on the data of last 5 years of weather forecasting. The proposed neural structure is self-governing to decide initial and boundary conditions to predict real-time flow discharge. Nonetheless, training and optimizing a neural network is time-consuming; however, it is a valuable tool for real-time forecasting. Further, this paper is organized into three main sections. Section 2 presents the proposed hybrid model; results are discussed and analyzed in Sect. 3. Finally, the conclusion is drawn in Sect. 4.

Proposed hybrid neural model

Saba and Rehman (2012) emphasize that forecasting using the single tool often comes out with low accuracy rate as compared to hybrid models. Accordingly, in this research MLP and RBF hybridization is performed for accurate weather forecasting. MLP/RBF are special types of artificial neural network (ANN) composed of interconnected neurons which exchange messages among each other from inputs to outputs using single hidden layer. MLP and RBF are the standard learning algorithm from the same class of ANN use feed forward strategy from input to output neurons. However, the activation functions in each category operate differently. The both types have their own pros and cons, accordingly, this research proposed a hybrid model to come out with better results and to cover limitations of each category for better forecasting accuracy (Nodehi et al. 2014).

Actually, both MLP and RBF need the training to solve a problem, in this phase networks establish a relation between inputs and outputs in conjunction with learning parameters. The networks map the relationship between the inputs and outputs and then modify its internal functions to determine the best relationship. Accordingly, two networks (MLP and RBF) are trained and tested to evaluate best possible network structure, input neurons, output neurons and a number of hidden layer(s). The structure of enhanced hybrid neural model is exhibited in Fig. 1 and is simplified format of hybrid neural structure (Maqsood et al. 2004).

Fig. 1
figure 1

Enhanced hybrid neural model

In fact, there are no standard criteria to calculate a number of neurons in hidden layer, it is calculated based on trial and error based experiments. However, for the number of neurons in input and output layers depends on the strategy in application. In this case, ten neurons represent ten weather features and two output neurons show dry and wet weather. Hence, each network is structured for the mentioned application and training is started by selecting initial weights randomly and learning parameters too small up to 0.1–0.3. Additionally, different activation functions are adopted to optimize the initial weights. Following rigorous experiments, ten input neurons are decided in training phase, twenty-five neurons for hidden layer and two output neurons are finalized using layers interconnection concept for 2 days advanced weather forecasting. Additionally, weights and biases are also achieved automatically. Moreover, connection weights are automatically tuned as per MLP and RBF requirements to attain desired outputs for the given inputs (Saba 2016). To evaluate the performance of proposed hybrid model for weather forecasting, data is collected from (http://www.accuweather.com/en/sa/saudi-arabia-weather). Equation (1) is employed to regulate interconnection weights.

$$\Delta {\text{w}}_{ij} (n) = - \varepsilon^{*} \frac{{\partial {\text{E}}}}{{\partial {\text{w}}_{ij} }} + \alpha^{*} \Delta {\text{w}}_{ij} (n - 1).$$
(1)

Here, \(\varepsilon \,{\text{and}}\,\alpha\) are the learning rate and momentum that are kept too small 0.1 and initial weight 0.2. \(\Delta {\text{w}}_{ij} (n)\,and\,\Delta {\text{w}}_{ij} (n - 1)\) are showing an increment from the node.

Artificial neural network learning has two main strategies supervised or unsupervised (Saba 2016). The supervised learning target is given and the neural network is trained to achieve it, while this case is not with unsupervised learning. Nonetheless, current research deals with the first category as a standard approach. Still, the issue in the supervised learning is to decide a suitable number of hidden layers and neurons in each layer. Actually, no hard and fast criteria are there to decide a number of hidden layers. If there are several hidden layers it will reduce network efficiency and will reduce the accuracy of forecasting. Additionally, the problem of overfitting is another crucial issue in neural network training. Multilayer perceptron (MLP) memorizes the training pattern, and therefore, it cannot generalize the new inputs; that leads network to an error state for fresh data; although it is small for the training set. To overcome this issue and to improve generalization ability of a neural network, a hybrid neural model with cross validation method is proposed.

Finally, the optimal neural structure is attained using trial and error strategy. The entire weather data obtained from (http://www.accuweather.com/en/sa/saudi-arabia-weather) is divided into training (50%), validation (30%) and test set (20%). To forecast 2 days ahead, output layer contains two neurons. To handle the errors in the training phase and to avoid over-fitting, the neural network is evaluated after certain iterations and its training is stopped immediately, if an error occurred or over-fitting is observed.

Results and discussion

Various distinctive factual measurements accessible were utilized to assess the degree to which the qualities that have been anticipated are of good and sensible quality. Root mean square error (RMSE) is required frequently, to measure or assess the effectiveness of the forecasting model (Saba 2016). The best neural structure is one that has less error and acceptable learning time (Rehman and Saba 2012; Saba et al. 2014; Rehman and Saba 2011). RMSE returns true values to be utilized as a standardized frame to compare the performance of the model on the expected and attained output. Finally, RMSE and correlation coefficient between observed and forecast data R, SI denotes scatter index. The weather forecasting reliability of individuals and hybrid neural model is evaluated on several statistical analysis tools and exhibited in Table 1.

$${\text{RMSE}} = \sqrt {\frac{{\sum\limits_{i = 1}^{N} {(y_{i} - x_{i} )^{2} } }}{N}}$$
(2)
$$R = \frac{{\sum\limits_{i = 1}^{N} {(x_{i} - \bar{x})(y_{i} - \bar{y})} }}{{\sqrt {\sum\limits_{i = 1}^{N} {(x_{i} - \bar{x})^{2} } } \sum\limits_{i = 1}^{N} {(y_{i} - \bar{y})^{2} } }}$$
(3)
$${\text{SI}} = {\text{RMSE}}/\bar{x},$$
(4)

where \(x_{i}\) represents attained values at the ith time step, \(y_{i}\) is the attained values, N for counter increment, \(\bar{x}\) and \(\bar{y}\) represents actual and attained values. In this regards, the verification statistics of weather forecasting for 2 days ahead is presented in Table 1. Hybrid neural model training and testing results are exhibited in Appendix A.

Table 1 Hour basis weather forecasting verification (2 days earlier)

Table 1 presents experimental results of individual neural networks and hybrid neural model using standard sigmoid activation function. The input feature vector includes average dew point, minimum temperature, maximum temperature, mean temperature, average relative moistness, precipitation, normal wind speed, high wind speed, average cloudiness and output layer composed of two neurons to represent rainy and dry weather. The hybrid neural model has exhibited better performance as compared to stand-alone networks. Additionally, non-linear models have an issue of limited capacity that could be covered using hybrid neural models.

It is always difficult to compare results in the state of art particularly in domain of weather forecasting due to several subjective issues like train/test data variety, neural architecture, learning parameters and activation functions. Additionally, most of the researchers employed individual neural network for forecasting. However, few available results on weather forecasting are compared.

Mathur et al. (2007) employed MLP with back propagation learning and perform time series analysis to predict max and min temperature forecasting. However, no standard database is employed and results are subjective. Hayati and Mohebi (2007) employed three layer MLP network, six hidden neurons, sigmoid activation function for hidden layers and a pure linear function for the output layer. The input parameters are gained after each 3 h that include wind speed, wind, direction, dry bulb, temperature, wet bulb temperature, relative humidity, dew point, pressure, visibility, amount of cloud. The other input parameters were measured daily: gust wind, mean temperature, maximum temperature, minimum temperature, precipitation, mean humidity, mean pressure, sunshine, radiation, evaporation. However, no standard database is employed and results are subjective. Baboo and Shereef (2010) also employed MLP three layers structure with standard back- propagation learning algorithm and claim least error. The input parameters include atmospheric pressure, atmospheric temperature, relative humidity, wind velocity and its direction.

A few researchers proposed hybrid neural models for weather forecasting. Kaur et al. (2011) and Maqsood et al. (2004) presented a hybrid neural model for twenty-four hours ahead weather forecasting. The hybrid model is fusion of several neural architectures including MLP, ERNN and the Hopfield Model. The authors compared forecasting results of individual networks with hybrid model and confirmed that hybrid model efficiency was better than individuals. Bustami et al. (2007) proposed a fusion of evolutionary neural networks (back propagation learning) and generic algorithms to forecast highest temperature/day. The input parameters included month, day, daily precipitation, max temperature, min temperature, max soil temperature, min soil temperature, max relative humidity, min relative humidity, solar radiation, and wind speed. Author claim an accuracy is 79.49 (20 error bound).

In most of the reported research MLP back propagation learning and RBFN are employed on weather forecasting with less or more same input parameters. However, fusion of classifiers seems to be better option on weather forecasting as their efficiency is better than individual classifier. Finally, authors recommend using a large standard train set, fusion of several classifiers for precise weather forecasting.

Conclusion

The neural networks are simpler and easy to implement as compared to other traditional methods. In particular, its generalization ability provides the most viable option for weather forecasting. It also reduces the analytical costs of topographical and hydrological functions. Accordingly, this paper has presented hybrid neural model and experimental results have exhibited that hybrid neural model outperforms than individual feed forward neural networks (MLP & RBF). It is also observed that hybrid model not only have better generalization ability but also better learning ability. Several statistical measures are adopted to verify the weather forecasting results of individual neural networks and hybrid neural model. In comparison to the regression models, hybrid neural model forecast weather at high precision. Future work may include training of hybrid neural model using synthetic data, online training, self-error detection, and correction.