# Forecasting of Rainfall across River Basins Using Soft Computing Techniques: The Case Study of the Upper Brahmani Basin (India)

^{1}

^{2}

^{*}

^{†}

## Abstract

**:**

^{2}, was considered as a study area. Therefore, an ANFIS model was developed to forecast rainfalls using 37 years of climate data from 1983 to 2020. A hybrid model with six membership functions provided the best forecast for the area under study. The suggested method blends neural network learning capabilities with transparent language representations of fuzzy systems; 75% of data (from 1983 to 2006) was set aside for training and 25% (from 2006 to 2020) for testing. The Gaussian membership function with the hybrid algorithm provided satisfactory accuracy with R-values for training and testing equal to 0.90 and 0.87, respectively. Therefore, a new promising forecasting model was developed for the period from 2021 to 2030. The highest rainfall was forecasted for the period June–August, which is a striking characteristic of the monsoon climate. The study area is relatively close to the equatorial warm climate region. Hence, the proposed model might be of consistent use for regions lying in similar latitudes.

## 1. Introduction

## 2. Materials and Methods

#### 2.1. Description of the Study Area and Data Collection

#### 2.2. Climatic Parameters

#### 2.3. ANFIS Architecture

_{i}, q

_{i}, and r

_{i}. The user defines the premise parameters, which must be optimized using the ANFIS training method. In a fuzzy system with two membership functions, A

_{1}and A

_{2}represent the input x membership functions, while B

_{1}and B

_{2}represent the input y membership functions. Figure 3 shows the ANFIS architecture with two input parameters (x, y) and one output parameter (f). It is worth noting that each layer’s node has the same functions described in the sections below. The output of the layer node ith is represented by O

_{l},

_{i}. The layers are described below.

_{i}or B

_{i−}

_{2}are linguistic labels (small or large). In other words, O

_{l},i specifies the extent to which the provided input x or y meets the quantifier and it is the membership grade of a fuzzy set A and B (A

_{1}, A

_{2}, B

_{1}, or B

_{2}) as A′s and B′s membership functions, respectively. Any appropriate parameterized membership function can be used including triangular, trapezoidal, Gaussian, bell, and other forms. In this study, a generalized bell-shaped membership function was used.

^{th}rule’s firing strength to the total of all rule firing strengths provided as:

_{i}, q

_{i}, and r

_{i}, whereas $\overline{{W}_{i}}$ is the normalized firing strength generated from layer 3. These parameters show optimum values after the ANFIS learning algorithm.

#### Development of an ANFIS Univariate Time Series Forecasting Model

_{norm}= normalized value of data, R

_{max}= maximum value of data, and R

_{min}= minimum value of data. The ANFIS model considered in this study used the Gaussian membership function (MF) with MF type “Constant”. It is to be noted that the grid partition technique is used here to figure out the number of MFs. Incidentally, this technique partitions the domains of the input variables into a number of fuzzy sets. A rule is formed by a combination of these fuzzy sets. The rule set covers the entire input space by using all possible combinations of the input fuzzy sets. The grid partition technique is then applied to generate membership functions for the parameters and to generate the optimized rules of a given data set. The ANFIS structure is shown in Figure 4. White circles represent the membership functions while the black ones represent input and output.

## 3. Results and Discussion

#### 3.1. Setup of the Proposed ANFIS Model and Evaluation of Its Performance

^{2}were used to safeguard this evaluation. Table 2 and Table 3 include the details for the membership functions and constants, respectively.

#### 3.2. Parametric Analysis

#### 3.3. Development of an Empirical Expression

_{1}, I

_{2}, I

_{3}], within the considered range, the normalization was performed using Equation (11). The normalized input set became [I

_{1n}, I

_{2n}, I

_{3n}].

_{1}to W

_{8}:

_{1}= [I

_{1}MF

_{1}] × [I

_{2}MF

_{1}] × [I

_{3}MF

_{1}]

_{2}= [I

_{1}MF

_{1}] × [I

_{2}MF

_{1}] × [I

_{3}MF

_{2}]

_{3}= [I

_{1}MF

_{1}] × [I

_{2}MF

_{2}] × [I

_{3}MF

_{2}]

_{4}= [I

_{1}MF

_{1}] × [I

_{2}MF

_{2}] × [I

_{3}MF

_{2}]

_{5}= [I

_{1}MF

_{2}] × [I

_{2}MF

_{1}] × [I

_{3}MF

_{1}]

_{6}= [I

_{1}MF

_{2}] × [I

_{2}MF

_{1}] × [I

_{3}MF

_{2}]

_{7}= [I

_{1}MF

_{2}] × [I

_{2}MF

_{2}] × [I

_{3}MF

_{1}]

_{8}= [I

_{1}MF

_{1}] × [I

_{2}MF

_{2}] × [I

_{3}MF

_{2}]

_{i}MF

_{j}corresponds to i

^{th}input and j

^{th}MF. The Gaussian membership function was represented by the following equation (Equation (13)):

_{n}was calculated from the relationship provided as

_{n}≤ 1.

_{n}

_{n}was carried out using the following equation (Equation (15)):

#### 3.4. Forecasting Rainfalls for the Period 2021–2030 by Using the Developed Empirical Equation

## 4. Conclusions

## Author Contributions

## Funding

## Data Availability Statement

## Conflicts of Interest

## References

- Rasel, H.M.; Imteaz, M.A. Application of Artificial Neural Network for seasonal rainfall forecasting: A case study for South Australia. In Proceedings of the World Congress on Engineering, London, UK, 29 June–1 July 2016. [Google Scholar]
- del Real, A.J.; Dorado, F.; Durán, J. Energy demand forecasting using deep learning: Applications for the French grid. Energies
**2020**, 13, 2242. [Google Scholar] [CrossRef] - Nourani, V.; Komasi, M. A geomorphology-based ANFIS model for multi-station modeling of rainfall-runoff process. J. Hydrol.
**2013**, 490, 41–55. [Google Scholar] [CrossRef] - Calp, M.H. A hybrid ANFIS-GA approach for estimation of regional rainfall amount. GU J. Sci.
**2019**, 32, 145–162. [Google Scholar] - Emamgholizadeh, S.; Moslemi, K.; Karami, G. Prediction the groundwater level of Bastam Plain (Iran) by Artificial Neural Network (ANN) and Adaptive Neuro-Fuzzy Inference System (ANFIS). Water Resour. Manage.
**2014**, 28, 5433–5446. [Google Scholar] [CrossRef] - Bacanli, U.G.; Firat, M.; Dikbas, F. Adaptive Neuro-Fuzzy Inference System for drought forecasting. Stoch. Environ. Res. Risk Assess.
**2009**, 23, 1143–1154. [Google Scholar] [CrossRef] - Aldrian, E.; Djamil, Y.S. Application of multivariate ANFIS for daily rainfall prediction: Influences of training data size. Makara Sains
**2008**, 12, 7–14. [Google Scholar] [CrossRef] - Tektas, M. Weather forecasting using ANFIS and ARIMA models. Environ. Res. Eng. Manag.
**2010**, 51, 5–10. [Google Scholar] - Zhang, X.-d.; Li, A.; Pan, R. Stock trend prediction based on a new status box method and AdaBoost probabilistic Support Vector Machine. Appl. Soft. Comput.
**2016**, 49, 385–398. [Google Scholar] [CrossRef] - Zhang, X.; Mohanty, S.N.; Parida, A.K.; Pani, S.K.; Dong, B.; Cheng, X. Annual and non-monsoon rainfall prediction modelling using SVR-MLP: An empirical study from Odisha. IEEE Access
**2020**, 8, 30223–30233. [Google Scholar] [CrossRef] - Kiani, R.S.; Ali, S.; Ashfaq, M.; Khan, F.; Muhammad, S.; Reboita, M.S.; Farooqi, A. Hydrological projections over the Upper Indus Basin at 1.5 °C and 2.0 °C temperature increase. Sci. Total Environ.
**2021**, 788, 147759. [Google Scholar] [CrossRef] - Mekanik, F.; Imteaz, M.A.; Talei, A. Seasonal rainfall forecasting by adaptive network-based fuzzy inference system (ANFIS) using large scale climate signals. Clim. Dyn.
**2016**, 46, 3097–3111. [Google Scholar] [CrossRef] - Aftab, S.; Ahmad, M.; Hameed, N.; Bashir, M.S.; Ali, I.; Nawaz, Z. Rainfall prediction in Lahore City using data mining techniques. Int. J. Adv. Comput. Sci. Appl.
**2018**, 9, 254–260. [Google Scholar] [CrossRef] - Kyada, P.M.; Kumar, P.; Sojitra, M.A. Rainfall forecasting using Artificial Neural Network (ANN) and Adaptive Neuro-Fuzzy Inference System (ANFIS) models. Int. J. Agric. Sci.
**2018**, 10, 6153–6159. [Google Scholar] - Usha, S.; Priya, S.B. An effective approach for promoting agriculture by predicting rainfall in India by using Machine Learning Techniques. J. Chem. Pharm. Sci.-Special Issue
**2016**, 37–43. [Google Scholar] - Khajure, S.; Mohod, S.W. Future weather forecasting using soft computing techniques. Procedia Comput. Sci.
**2016**, 78, 402–407. [Google Scholar] [CrossRef] [Green Version] - Chantry, M.; Christensen, H.; Dueben, P.; Palmer, T. Opportunities and challenges for machine learning in weather and climate modelling: Hard, medium and soft AI. Philos. Trans. A Math. Phys. Eng. Sci.
**2021**, 379, 20200083. [Google Scholar] [CrossRef] - Novitasari, D.C.R.; Rohayani, H.; Suwanto; Arnita; Rico; Junaidi, R.; Setyowati, R.D.; Pramulya, R.; Setiawan, F. Weather parameters forecasting as variables for rainfall prediction using Adaptive Neuro Fuzzy Inference System (ANFIS) and Support Vector Regression (SVR). J. Phys. Conf. Ser.
**2020**, 1501, 012012. [Google Scholar] [CrossRef] - Rani, S.I.; Arulalan, T.; George, J.P.; Rajagopal, E.N.; Renshaw, R.; Maycock, A.; Barker, D.M.; Rajeevan, M. IMDAA: High-resolution satellite-era reanalysis for the Indian monsoon region. J. Climate
**2021**, 34, 5109–5133. [Google Scholar] [CrossRef] - Jang, J.-S.R.J. ANFIS: Adaptive-Network-Based Fuzzy Inference System. IEEE T. Syst. Man Cyb.
**1993**, 23, 665–685. [Google Scholar] [CrossRef] - Karaboga, D.; Kaya, E. Adaptive network-based fuzzy inference system (ANFIS) training approaches: A comprehensive survey. Artif. Intell. Rev.
**2019**, 52, 2263–2293. [Google Scholar] [CrossRef] - Kişi, Ö. Daily pan evaporation modelling using a neuro-fuzzy computing technique. J. Hydrol.
**2006**, 329, 636–646. [Google Scholar] [CrossRef] - Rao, K.K.; Kulkarni, A.; Patwardhan, S.; Kumar, B.V.; Kumar, T.V.L. Future changes in precipitation extremes during northeast monsoon over south peninsular India. Theor. Appl. Climatol.
**2020**, 142, 205–217. [Google Scholar] [CrossRef] - Ashrafi, M.; Chua, L.H.C.; Quek, C.; Qin, X. A fully-online Neuro-Fuzzy model for flow forecasting in basins with limited data. J. Hydrol.
**2017**, 545, 424–435. [Google Scholar] [CrossRef] - Suparta, W.; Samah, A.A. Rainfall prediction by using ANFIS times series technique in South Tangerang, Indonesia. Geod. Geodyn.
**2020**, 11, 411–417. [Google Scholar] [CrossRef] - Mosavi, A.; Ozturk, P.; Chau, K.-W. Flood prediction using Machine Learning models: Literature review. Water
**2018**, 10, 1536. [Google Scholar] [CrossRef] [Green Version] - Sharma, A.; Goyal, M.K. A comparison of three soft computing techniques, Bayesian Regression, Support Vector Regression, and Wavelet Regression, for monthly rainfall forecast. J. Intell. Syst.
**2017**, 26, 641–655. [Google Scholar] [CrossRef] - Tarun, G.B.S.; Sriram, J.V.; Sairam, K.; Sreenivas, K.T.; Santhi, M.V.B.T. Rainfall prediction using Machine Learning Techniques. Int. J. Innov. Technol. Explor. Eng.
**2019**, 8, 957–963. [Google Scholar]

**Figure 6.**Comparison of the ANFIS outcomes with the actual data for the (

**a**) training and (

**b**) testing data set.

**Figure 8.**Comparison of forecasted results with actual ones for the period 2011 to 2020. The x-axis refers to the months from January (i.e., 1) to December (i.e., 12), the y-axis refers to the normalized rainfall, and the given year is provided at the top of each graph.

**Figure 10.**Combined effects of (

**a**) R(t) and R(t − 1), (

**b**) R(t) and R(t − 2), and (

**c**) R(t − 1) and R(t − 2) on the output.

**Figure 11.**Forecasted normalized monthly rainfall from 2021 to 2030, along with the average rainfall (from 2011 to 2020).

Parameters | Rainfall | T_{max} | T_{min} | RH | WS | SR |
---|---|---|---|---|---|---|

Unit | mm/day | °C | °C | % | m/s | kw-hr/m^{2}/day |

Frequency | Daily | |||||

Time | 1983–2020 | |||||

Source | Indian Monsoon Data Assimilation and Analysis (IMDAA) | |||||

Spatial Resolution | 0.25° × 0.25° |

Inputs | Membership Function | |||
---|---|---|---|---|

Unit | MF_{1} | MF_{2} | ||

σ | C | σ | C | |

I1 | 0.2152 | −1.031 | 0.2323 | −0.6165 |

I2 | 0.08962 | −1.032 | 0.1304 | −0.7043 |

I3 | 0.2201 | −1.024 | 0.2318 | −0.6137 |

Input | Constant |
---|---|

1 | −1.084 |

2 | −0.783 |

3 | −1.099 |

4 | −0.6866 |

5 | −0.8932 |

6 | −0.9446 |

7 | −0.5058 |

8 | −0.9508 |

**Table 4.**Performance indices MSE and MAPE to evaluate the prediction effects of the proposed ANFIS model.

Year | 2011 | 2012 | 2013 | 2014 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 |
---|---|---|---|---|---|---|---|---|---|---|

MSE | 0.007 | 0.002 | 0.002 | 0.001 | 0.003 | 0.001 | 0.005 | 0.002 | 0.001 | 0.003 |

MAPE | 7.04 | 4.15 | 3.93 | 2.54 | 4.49 | 3.22 | 4.78 | 3.80 | 2.72 | 5.09 |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Rao, M.U.M.; Patra, K.C.; Sasmal, S.K.; Sharma, A.; Oliveto, G.
Forecasting of Rainfall across River Basins Using Soft Computing Techniques: The Case Study of the Upper Brahmani Basin (India). *Water* **2023**, *15*, 499.
https://doi.org/10.3390/w15030499

**AMA Style**

Rao MUM, Patra KC, Sasmal SK, Sharma A, Oliveto G.
Forecasting of Rainfall across River Basins Using Soft Computing Techniques: The Case Study of the Upper Brahmani Basin (India). *Water*. 2023; 15(3):499.
https://doi.org/10.3390/w15030499

**Chicago/Turabian Style**

Rao, M. Uma Maheswar, Kanhu Charan Patra, Suvendu Kumar Sasmal, Anurag Sharma, and Giuseppe Oliveto.
2023. "Forecasting of Rainfall across River Basins Using Soft Computing Techniques: The Case Study of the Upper Brahmani Basin (India)" *Water* 15, no. 3: 499.
https://doi.org/10.3390/w15030499