Uncertainty assessment of the multilayer perceptron (MLP) neural network model with implementation of the novel hybrid MLP-FFA method for prediction of biochemical oxygen demand and dissolved oxygen: a case study of Langat River

  • Bahare Raheli
  • Mohammad Taghi Aalami
  • Ahmed El-Shafie
  • Mohammad Ali Ghorbani
  • Ravinesh C. Deo
Original Article


Accurate prediction of the chemical constituents in major river systems is a necessary task for water quality management, aquatic life well-being and the overall healthcare planning of river systems. In this study, the capability of a newly proposed hybrid forecasting model based on the firefly algorithm (FFA) as a metaheuristic optimizer, integrated with the multilayer perceptron (MLP-FFA), is investigated for the prediction of monthly water quality in Langat River basin, Malaysia. The predictive ability of the MLP-FFA model is assessed against the MLP-based model. To validate the proposed MLP-FFA model, monthly water quality data over a 10-year duration (2001–2010) for two different hydrological stations (1L04 and 1L05) provided by the Irrigation and Drainage Ministry of Malaysia are used to predict the biochemical oxygen demand (BOD) and dissolved oxygen (DO). The input variables are the chemical oxygen demand (COD), total phosphate (PO4), total solids, potassium (K), sodium (Na), chloride (Cl), electrical conductivity (EC), pH and ammonia nitrogen (NH4-N). The proposed hybrid model is then evaluated in accordance with statistical metrics such as the correlation coefficient (r), root-mean-square error, % root-mean-square error and Willmott’s index of agreement. Analysis of the results shows that MLP-FFA outperforms the equivalent MLP model. Also, in this research, the uncertainty of a MLP neural network model is analyzed in relation to the predictive ability of the MLP model. To assess the uncertainties within the MLP model, the percentage of observed data bracketed by 95 percent predicted uncertainties (95PPU) and the band width of 95 percent confidence intervals (d-factors) are selected. The effect of input variables on BOD and DO prediction is also investigated through sensitivity analysis. The obtained values bracketed by 95PPU show about 77.7%, 72.2% of data for BOD and 72.2%, 91.6% of data for DO related to the 1L04 and 1L05 stations, respectively. The d-factors have a value of 1.648, 2.269 for BOD and 1.892, 3.480 for DO related to the 1L04 and 1L05 stations, respectively. Based on the values in both stations for the 95PPU and d-factor, it is concluded that the neural network model has an acceptably low degree of uncertainty applied for BOD and DO simulations. The findings of this study can have important implications for error assessment in artificial intelligence-based predictive models applied for water resources management and the assessment of the overall health in major river systems.


BOD and DO Multilayer perceptron (MLP) Firefly algorithm Hybrid model Uncertainty assessment River water quality 



Artificial neural network


Biochemical oxygen demand




Chemical oxygen demand


Electrical conductivity


Dissolved oxygen


Firefly algorithm




Multilayer perceptron




Ammonia nitrogen


Total phosphate


95 Percent predicted uncertainty


Total solids



The authors wish to thank the Department of Irrigation and Drainage in Malaysia for providing the required data for this research. The authors would also like to thank the anonymous reviewers for their valuable comments.


  1. Abbaspour KC, Yang J, Maximov I, Siber R, Bogner K, Mieleitner J, Zobrist J, Srinivasan R (2007) Modelling hydrology and water quality in the pre-alpine/alpine Thur watershed using SWAT. J Hydrol 333(2–4):413–430CrossRefGoogle Scholar
  2. Abbot J, Marohasy J (2014) Input selection and optimisation for monthly rainfall forecasting in Queensland, Australia, using artificial neural networks. Atmos Res 138:166–178CrossRefGoogle Scholar
  3. Adamowski J, Fung Chan H, Prasher SO, Ozga-Zielinski B, Sliusarieva A (2012) Comparison of multiple linear and nonlinear regression, autoregressive integrated moving average, artificial neural network, and wavelet artificial neural network methods for urban water demand forecasting in Montreal, Canada. Water Resour Res 48:1–14CrossRefGoogle Scholar
  4. Antanasijević D, Pocajt V, Perić-Grujić A, Ristić M (2014) Modelling of dissolved oxygen in the Danube River using artificial neural networks and Monte Carlo simulation uncertainty analysis. J Hydrol 519:1895–1907CrossRefGoogle Scholar
  5. Aqil M, Kita I, Yano A, Nishiyama S (2007) Analysis and prediction of flow from local source in a river basin using a Neuro-fuzzy modeling tool. J Environ Manag 85(1):215–223CrossRefGoogle Scholar
  6. Ay M, Kisi O (2011) Modeling of dissolved oxygen concentration using different neural network techniques in Foundation Creek, El Paso County, Colorado. J Environ Eng 138(6):654–662CrossRefGoogle Scholar
  7. Canale RP, Seo DI (1996) Performance, reliability and uncertainty of total phosphorus models for lakes—II. Stochastic analyses. Water Res 30(1):95–102CrossRefGoogle Scholar
  8. Cea L, Bermúdez M, Puertas J (2011) Uncertainty and sensitivity analysis of a depth-averaged water quality model for evaluation of Escherichia Coli concentration in shallow estuaries. Environ Model Softw 26(12):1526–1539CrossRefGoogle Scholar
  9. Ch S, Sohani S, Kumar D, Malik A, Chahar B, Nema A, Panigrahi BK, Dhiman RC (2014) A support vector machine-firefly algorithm based forecasting model to determine malaria transmission. Neurocomputing 129:279–288CrossRefGoogle Scholar
  10. Chen WB, Liu WC (2014) Artificial neural network modeling of dissolved oxygen in reservoir. J Environ Monit Assess 186(2):1203–1217CrossRefGoogle Scholar
  11. Chen JC, Chang N, Shieh W (2003) Assessing wastewater reclamation potential by neural network model. Eng Appl Artif Intell 16(2):149–157CrossRefGoogle Scholar
  12. Dehghani M, Saghafian B, Nasiri Saleh F, Farokhnia A, Noori R (2013) Uncertainty analysis of streamflow drought forecast using artificial neural networks and Monte-Carlo simulation. Int J Climatol 34(4):1169–1180CrossRefGoogle Scholar
  13. Deo RC, Şahin M (2016) An extreme learning machine model for the simulation of monthly mean streamflow water level in eastern Queensland. Environ Monit Assess 188:1–24CrossRefGoogle Scholar
  14. Deo RC, Şahin M (2017) Forecasting long-term global solar radiation with an ANN algorithm coupled with satellite-derived (MODIS) land surface temperature (LST) for regional locations in Queensland. Renew Sustain Energy Rev 72:828–848CrossRefGoogle Scholar
  15. Deo RC, Kisi O, Singh VP (2016) Drought forecasting in eastern Australia using multivariate adaptive regression spline, least square support vector machine and M5Tree model. Atmos Res 184:149–175CrossRefGoogle Scholar
  16. Diamantopoulou MJ, Papamichail DM, Antonopoulos VZ (2005) The use of a neural network technique for the prediction of water quality parameters. Oper Res 5(1):115–125Google Scholar
  17. Dogan E, Sengorur B, Koklu R (2009) Modeling biological oxygen demand of the Melen River in Turkey using an artificial neural network technique. J Environ Manag 90(2):1229–1235CrossRefGoogle Scholar
  18. Emary E, Zawbaa HM, Ghany KKA, Hassanien AE, Parv B (2015) Firefly optimization algorithm for feature selection. Paper presented at the proceedings of the 7th Balkan conference on informatics conference. ACMGoogle Scholar
  19. Fahimi F, Yaseen ZM, El-shafie A (2016) Application of soft computing based hybrid models in hydrological variables modeling: a comprehensive review. Theor Appl Climatol. doi: 10.1007/s00704-016-1735-8 Google Scholar
  20. Fu Q, Jiang R, Wang Z, Li T (2015) Optimization of soil water characteristic curves parameters by modified firefly algorithm. Trans Chin Soc Agric Eng 31(11):117–122Google Scholar
  21. Galelli S, Castelletti A (2013) Tree-based iterative input variable selection for hydrological modeling. Water Resour 49(7):4295–4310CrossRefGoogle Scholar
  22. Gardner MW, Dorling S (1998) Artificial neural networks (the multilayer perceptron)—a review of applications in the atmospheric sciences. Atmos Environ 32(14):2627–2636CrossRefGoogle Scholar
  23. Ghorbani MA, Zadeh HA, Isazadeh M, Terzi O (2016) A comparative study of artificial neural network (MLP, RBF) and support vector machine models for river flow prediction. Environ Earth Sci 75(6):1–14CrossRefGoogle Scholar
  24. Ghorbani MA, Shamshirband S, Haghi DZ, Azani A, Bonakdari H, Ebtehaj I (2017) Application of firefly algorithm-based support vector machines for prediction of field capacity and permanent wilting point. Soil Tillage Res 172:32–38CrossRefGoogle Scholar
  25. Govindaraju RS (2000) Artificial neural networks in hydrology. I: preliminary concepts. J Hydrol Eng 5(2):115–123CrossRefGoogle Scholar
  26. Gupta HV, Beven KJ, Wagener T (2006) Model calibration and uncertainty estimation. Encyclopedia hydrol sci 11:131. doi: 10.1002/0470848944.hsa138 Google Scholar
  27. Heinemann AB, van Oort PA, Fernandes DS, Maia AdHN (2012) Sensitivity of APSIM/ORYZA model due to estimation errors in solar radiation. Bragantia Campinas 71(4):572–582CrossRefGoogle Scholar
  28. Hinton GE (1992) How neural networks learn from experience. Sci Am 267(3):145–151CrossRefGoogle Scholar
  29. Hore A, Dutta S, Datta S, Bhattacharjee C (2008) Application of an artificial neural network in wastewater quality monitoring: prediction of water quality index. Int J Nucl Desalin 3(2):160–174CrossRefGoogle Scholar
  30. Jamieson P, Porter J, Wilson D (1991) A test of the computer simulation model ARCWHEAT1 on wheat crops grown in New Zealand. Field Crops Res 27(4):337–350CrossRefGoogle Scholar
  31. Jensen B (1994) Expert systems-neural networks. Instrument engineers’ handbook, 3rd edn. Chilton, RadnorGoogle Scholar
  32. Jiang Y, Nan Z, Yang S (2013) Risk assessment of water quality using Monte Carlo simulation and artificial neural network method. J Environ Manag 122:130–136CrossRefGoogle Scholar
  33. Kavousi-Fard A, Samet H, Marzbani F (2014) A new hybrid modified firefly algorithm and support vector regression model for accurate short term load forecasting. Expert Syst Appl 41(13):6047–6056CrossRefGoogle Scholar
  34. Kayarvizhy N, Kanmani S, Uthariaraj R (2014) ANN models optimized using swarm intelligence algorithms. WSEAS Trans Comput 13(45):501–519Google Scholar
  35. Kazemzadeh-Parsi M (2014) A modified firefly algorithm for engineering design optimization problems. Iran J Sci Technol IJST Trans Mech Eng 38(M2):403Google Scholar
  36. Kim SE, Seo IW (2015) Artificial neural network ensemble modeling with conjunctive data clustering for water quality prediction in rivers. J Hydro-environ Res 9(3):325–339CrossRefGoogle Scholar
  37. Kurunç A, Yürekli K, Çvik O (2005) Performance of two stochastic approaches for forecasting water quality and streamflow data from Yeşilιrmak River, Turkey. Environ Model Softw 20(9):1195–1200CrossRefGoogle Scholar
  38. Long NC, Meesad P (2013) Meta-heuristic algorithms applied to the optimization of type-1 and type-2 TSK fuzzy logic systems for sea water level prediction. In: 2013 IEEE 6th international workshop computational intelligence and applications IWCIA 2013—proceedings, pp 69–74. doi: 10.1109/IWCIA.2013.6624787
  39. Łukasik S, Żak S (2009) Firefly algorithm for continuous constrained optimization tasks. Firefly Algorithm Contin Constrained Optim Tasks 5796:97–106. doi: 10.1007/978-3-642-04441-0_8 Google Scholar
  40. Maier HR, Dandy GC (2000) Neural networks for the prediction and forecasting of water resources variables: a review of modelling issues and applications. Environ Model Softw 15(1):101–124CrossRefGoogle Scholar
  41. Najah A, Elshafie A, Karim OA, Jaffar O (2009) Prediction of Johor River water quality parameters using artificial neural networks. Eur J Sci Res 28(3):422–435Google Scholar
  42. Najah A, El-Shafie A, Karim OA, Jaafar O, El-Shafie AH (2011) An application of different artificial intelligences techniques for water quality prediction. Int J Phys Sci 6(22):5298–5308Google Scholar
  43. Nascimento Z, Sadok D, Fernandes S (2013) Comparative study of a hybrid model for network traffic identification and its optimization using firefly algorithm. In: 2013 IEEE symposium on computers and communications, pp 000862–000867. doi: 10.1109/ISCC.2013.6755057
  44. Noori R, Hoshyaripour G, Ashrafi K, Araabi BN (2010) Uncertainty analysis of developed ANN and ANFIS models in prediction of carbon monoxide daily concentration. Atmos Environ 44(4):476–482CrossRefGoogle Scholar
  45. Noori R, Safavi S, Shahrokni SAN (2013a) A reduced-order adaptive neuro-fuzzy inference system model as a software sensor for rapid estimation of five-day biochemical oxygen demand. J Hydrol 495:175–185CrossRefGoogle Scholar
  46. Noori R, Karbassi A, Ashrafi K, Ardestani M, Mehrdadi N (2013b) Development and application of reduced-order neural network model based on proper orthogonal decomposition for BOD5 monitoring: active and online prediction. Environ Prog Sustain Energy 32(1):120–127CrossRefGoogle Scholar
  47. Noori R, Deng Z, Kiaghadi A, Kachoosangi FT (2015a) How reliable are ANN, ANFIS, and SVM techniques for predicting longitudinal dispersion coefficient in natural rivers? J Hydraul Eng 142(1):04015039CrossRefGoogle Scholar
  48. Noori R, Yeh HD, Abbasi M, Kachoosangi FT, Moazami S (2015b) Uncertainty analysis of support vector machine for online prediction of five-day biochemical oxygen demand. J Hydrol 527:833–843CrossRefGoogle Scholar
  49. Palani S, Liong SY, Tkalich P (2008) An ANN application for water quality forecasting. Mar Pollut Bull 56(9):1586–1597. doi: 10.1016/j.marpolbul.2008.05.021 CrossRefGoogle Scholar
  50. Quilty J, Adamowski J, Khalil B, Rathinasamy M (2016) Bootstrap rank-ordered conditional mutual information (broCMI): a nonlinear input variable selection method for water resources modeling. Water Resour Res 52:2299–2326. doi: 10.1002/2015WR016959 CrossRefGoogle Scholar
  51. Salami E, Ehteshami M (2015) Simulation, evaluation and prediction modeling of river water quality properties (case study: Ireland Rivers). Int J Environ Sci Technol 12(10):3235–3242CrossRefGoogle Scholar
  52. Sarkar A, Pandey P (2015) River water quality modelling using artificial neural network technique. Aquat Procedia 4:1070–1077CrossRefGoogle Scholar
  53. Sedki A, Ouazar D (2010) Hybrid particle swarm and neural network approach for streamflow forecasting. Math Model Nat Phenom 5:132–138. doi: 10.1051/mmnp/20105722 CrossRefGoogle Scholar
  54. Sengorur B, Dogan E, Koklu R, Samandar A (2006) Dissolved oxygen estimation using artificial neural network for water quality control. Fres Environ Bull 15(9):1064–1067Google Scholar
  55. Sin G, Gernaey KV, Neumann MB, van Loosdrecht MC, Gujer W (2009) Uncertainty analysis in WWTP model applications: a critical discussion using an example from design. Water Res 43(11):2894–2906CrossRefGoogle Scholar
  56. Singh KP, Basant A, Malik A, Jain G (2009) Artificial neural network modeling of the river water quality—a case study. Ecol Model 220(6):888–895. doi: 10.1016/j.ecolmodel.2009.01.004 CrossRefGoogle Scholar
  57. Soyupak S, Karaer F, Gürbüz H, Kivrak E, Sentürk E, Yazici A (2003) A neural network-based approach for calculating dissolved oxygen profiles in reservoirs. Neural Comput Appl 12:166–172CrossRefGoogle Scholar
  58. Srivastava PK, Han D, Rico-Ramirez MA, Islam T (2014) Sensitivity and uncertainty analysis of mesoscale model downscaled hydro-meteorological variables for discharge prediction. Hydrol Process 28(15):4419–4432CrossRefGoogle Scholar
  59. Talatahari S, Gandomi AH, Yun GJ (2014) Optimum design of tower structures using firefly algorithm. Struct Des Tall Spec Build 23:350–361. doi: 10.1002/tal.1043 CrossRefGoogle Scholar
  60. Tiwari MK, Adamowski J (2013) Urban water demand forecasting and uncertainty assessment using ensemble wavelet-bootstrap-neural network models. Water Resour Res 49(10):6486–6507CrossRefGoogle Scholar
  61. Wagener T, Gupta HV (2005) Model identification for hydrological forecasting under uncertainty. Stoch Environ Res Risk A 19(6):378–387CrossRefGoogle Scholar
  62. Wen X, Fang J, Diao M, Zhang C (2013) Artificial neural network modeling of dissolved oxygen in the Heihe River, Northwestern China. Environ Monit Assess 185(5):4361–4371CrossRefGoogle Scholar
  63. Willmott CJ (1981) On the validation of models. Phys Geogr 2(2):184–194Google Scholar
  64. Willmott CJ (1984) On the evaluation of model performance in physical geography. Spat Stat Models Springer 40:443–460CrossRefGoogle Scholar
  65. Willmott CJ, Matsuura K (2005) Advantages of the mean absolute error (MAE) over the root mean square error (RMSE) in assessing average model performance. Clim Res 30(1):79–82CrossRefGoogle Scholar
  66. Wu HJ, Lin ZY, Gao SL (2000) The application of artificial neural networks in the resources and environment. Resour Environ Yangtze Basin 9(2):241–246Google Scholar
  67. Xiang S, Liu Z, Ma L (2006) Study of multivariate linear regression analysis model for ground water quality prediction. Guizhou Sci 24(1):60–62Google Scholar
  68. Yang XS (2010) Firefly algorithm, stochastic test functions and design optimization. Int J Bio-Inspired Comput 2(2):78–84. doi: 10.1504/IJBIC.2010.032124 CrossRefGoogle Scholar
  69. Ying Z, Jun N, Fuyi C, Liang G (2007) Water quality forecast through application of BP neural network at Yuquio reservoir. J Zhejjang Univ Sci A 8:1482–1487CrossRefGoogle Scholar

Copyright information

© Springer-Verlag GmbH Germany 2017

Authors and Affiliations

  • Bahare Raheli
    • 1
  • Mohammad Taghi Aalami
    • 1
  • Ahmed El-Shafie
    • 2
  • Mohammad Ali Ghorbani
    • 3
    • 4
  • Ravinesh C. Deo
    • 5
  1. 1.Department of Civil EngineeringUniversity of TabrizTabrizIran
  2. 2.Department of Civil Engineering, Faculty of EngineeringUniversity of MalayaKuala LumpurMalaysia
  3. 3.Department of Water EngineeringUniversity of TabrizTabrizIran
  4. 4.Engineering FacultyNear East UniversityNicosiaTurkey
  5. 5.School of Agriculture, Computational and Environmental Sciences, Institute of Agriculture and Environment (IAg&E)University of Southern QueenslandSpringfieldAustralia

Personalised recommendations