Abstract
Water quality index is an important indicator to evaluate the water quality of rivers. Machine learning models have been widely used in the task of water quality index prediction, but the problem of model parameter optimization still has not been effectively solved, which seriously affects the prediction accuracy and the applicability of the model. In recent years, a variety of intelligent optimization algorithms have been applied to solve model parameter optimization problems. For example, Sparrow Search Algorithm (SSA), Gray Wolf Optimization (GWO), Genetic Algorithm (GA), etc. However, the existing optimization algorithm has limited optimization capability and still needs further improvement so as to enhance the optimization capability. In this paper, we improve the standard sparrow search algorithm. The improved sparrow search algorithm (IMSSA) uses Tent chaotic sequences to initialize the sparrow population, thus increasing the population diversity; we add adaptive inertia weights and random inertia weights to the SSA, while incorporating the simulated annealing algorithm for optimization, which improves the search performance, convergence accuracy and the ability to jump out of local optimal solutions. We compare the IMSSA with other advanced optimization algorithms on several common test functions, and the results show that the algorithm outperforms other algorithms in terms of convergence accuracy and merit-seeking ability. Meanwhile, we used the IMSSA to optimize the parameters of support vector regression (SVR) and random forest regression (RFR) models to obtain two water quality index prediction models, IMSSA-SVR and IMSSA-RFR, and applied the models to river dissolved oxygen and permanganate index prediction. The experiments show that our model effectively improves the prediction accuracy of river water quality index and has strong practicality.

















Similar content being viewed by others
Data availability
The datasets generated during and/or analysed during the current study are available from the corresponding author on reasonable request.
References
Antanasijevic D, Pocajt V, Peric-Grujic’ A, Ristic’ M (2020) Multilevel split of high-dimensional water quality data using artificial neural networks for the prediction of dissolved oxygen in the Danube River. Neural Comput Appl 32:3957–3966. https://doi.org/10.1007/s00521-019-04079-y
Asadollah SBHS, Sharafati A, Motta D, Yaseen ZM (2020) River water quality index prediction and uncertainty analysis: a comparative study of machine learning models. J Environ Chem Eng 9:104599. https://doi.org/10.1016/j.jece.2020.104599
Bi J, Lin Y, Dong Q, Yuan H, Zhou MC (2021) Large-scale water quality prediction with integrated deep neural network. Inf Sci 571:191–205. https://doi.org/10.1016/j.ins.2021.04.057
Chen W, Hasanipana M, Rad HN et al (2021) A new design of evolutionary hybrid optimization of SVR model in predicting the blast-induced ground vibration. Eng Comput 37:1455–1471. https://doi.org/10.1007/s00366-019-00895-x
Chen Z, Yang C, Qiao J (2022) The optimal design and application of LSTM neural network based on the hybrid coding PSO algorithm. J Supercomput 78:7227–7259. https://doi.org/10.1007/s11227-021-04142-3
Demir FB, Tuncer T, Kocamaz AF (2020) A chaotic optimization method based on logistic-sine map for numerical function optimization. Neural Comput & Applic 32:14227–14239. https://doi.org/10.1007/s00521-020-04815-9
Feng B, Xu J, Zhang Y, Lin Y (2021) Multi-step traffic speed prediction based on ensemble learning on an urban road network. Appl Sci 11:4423. https://doi.org/10.3390/app11104423
Gupta P, Bhagat S, Saini DK, Kumar A, Alahmadi M et al (2022) Hybrid whale optimization algorithm for resource optimization in cloud e-healthcare applications. Comput Mater Continua 71(3):5659–5676
Hu Z, Zhang Y, Zhao Y et al. (2019) A water quality prediction method based on the deep LSTM network considering correlation in smart Mariculture. Sens https://doi.org/10.3390/s19061420
Huo F, Wang Y, Ren W (2022) Improved artificial bee colony algorithm and its application in image threshold segmentation. Multimed Tools Appl 81:2189–2212. https://doi.org/10.1007/s11042-021-11644-y
Jianhua L, Zhiheng W (2021) A hybrid sparrow search algorithm based on constructing similarity. IEEE Access 9:117581–117595. https://doi.org/10.1007/s12652-021-03365-9
Lee J, Perkins D (2020) A simulated annealing algorithm with a dual perturbation method for clustering. Pattern Recogn 112:107713. https://doi.org/10.1016/j.patcog.2020.107713
Li Xingjia, Jinan Gu, Xiaohong Sun et al. (2021) Parameter identification of robot manipulators with unknown payloads using an improved chaotic sparrow search algorithm. Appl Intell https://doi.org/10.1007/s10489-021-02972-5
Li X, Ma X, Xiao F, Xiao C, Wang F, Zhang S (2022) Time-series production forecasting method based on the integration of bidirectional gated recurrent unit (Bi-GRU) network and sparrow search algorithm (SSA). J Pet Sci Eng 208:109309. https://doi.org/10.1016/j.petrol.2021.109309
Lin JC-W, Djenouri Y, Srivastava G et al (2021) A predictive GA-based model for closed high-utility itemset mining. Appl Soft Comput 108:107422. https://doi.org/10.1016/j.asoc.2021.107422
Lin JCW, Djenouri Y, Srivastava G et al (2022) Efficient evolutionary computation model of closed high-utility itemset mining. Appl Intell 52:10604–10616. https://doi.org/10.1007/s10489-021-03134-3
Liu G, Shu C, Liang Z et al (2021) A modified sparrow search algorithm with application in 3d route planning for UAV. Sens 21:1224. https://doi.org/10.3390/s21041224
Longqin X, Liu S (2013) Study of short-term water quality prediction model based on wavelet neural network. Math Comput Model 58(3–4):807–813
Ma B et al (2021) Enhanced sparrow search algorithm with mutation strategy for global optimization. IEEE Access 9:159218–159261. https://doi.org/10.1109/ACCESS.2021.3129255
Noori N, Kalin L, Isik S (2020) Water quality prediction using SWAT-ANN coupled approach. J Hydrol 590:125220. https://doi.org/10.1016/j.jhydrol.2020.125220
Nouraki A, Alavi M, Golabi M, Albaji M (2021) Prediction of water quality parameters using machine learning models: a case study of the Karun River. Iran Environ Sci Pollut Res 28:57060–57072. https://doi.org/10.1007/s11356-021-14560-8
Peng Wang Y, Zhang HY (2021) Research on economic optimization of microgrid cluster based on Chaos sparrow search algorithm. Comput Intell Neurosci 3:1–18. https://doi.org/10.1155/2021/5556780
Pham A-D, Ngo N-T et al (2020) Hybrid machine learning for predicting strength of sustainable concrete. Soft Comput 24:14965–14980. https://doi.org/10.1007/s00500-020-04848-1
Ribeiro F, Gradvohl ALS (2021) Machine learning techniques applied to solar flares forecasting. Astronom Comput 35:100468. https://doi.org/10.1016/j.ascom.2021.100468
Sahu AK (2021) A logistic map based blind and fragile watermarking for tamper detection and localization in images. J Ambient Intell Humaniz Comput https://doi.org/10.1007/s12652-021-03365-9
Shah MI, Abunama T, Javed MF et al (2021) Modeling surface water quality using the adaptive neuro-fuzzy inference system aided by input optimization. Sustain 13:4576. https://doi.org/10.3390/su13084576
Shang Z, He Z, Song Y, Yang Y, Li L, Chen Y (2020) A novel combined model for short-term electric load forecasting based on whale optimization algorithm. Neural Process Lett 52:1207–1232. https://doi.org/10.1007/s11063-020-10300-0
Shao Y et al (2023) Multi-objective neural evolutionary algorithm for combinatorial optimization problems. IEEE Trans Neural Netw Learn Syst 34(4):2133–2143. https://doi.org/10.1109/TNNLS.2021.3105937
Siyu C, Guohua F, Xianfeng H et al (2020) Water quality prediction model of a water diversion project based on the improved artificial bee Colony-backpropagation neural network. Water 10(9):806. https://doi.org/10.3390/w10060806
Srinivasua PN, Srinivasa Raoa T, Dicu AM et al (2020) A comparative review of optimisation techniques in segmentation of brain MR images. J Intell Fuzzy Syst 38:6031–6043. https://doi.org/10.3233/JIFS-179688
Tiwari D, Bhati BS, Al-Turjman F, Nagpal B (2021) Pandemic coronavirus disease (Covid-19): world effects analysis and prediction using machine-learning techniques. Expert Syst https://doi.org/10.1111/exsy.12714
Xu J, Xu Z, Kuang J, Lin C, Xiao L, Huang X, Zhang Y (2021) An Alternative to Laboratory Testing:Random Forest-Based Water Quality Prediction Framework for Inland and Nearshore Water Bodies. Water 13(22):3262. https://doi.org/10.3390/w13223262
Xue J, Shen B (2020) A novel swarm intelligence optimization approach: sparrow search algorithm. Syst Sci Control Eng 8(1):22–34. https://doi.org/10.1080/21642583.2019.1708830
Zaqoot HA, Hamada M, Miqdad S (2018) A comparative study of Ann for predicting nitrate concentration in groundwater Wells in the southern area of Gaza strip. Appl Artif Intell 32(7–8):727–744. https://doi.org/10.1080/08839514.2018.1506970
Zhang C, Ding S (2021) A stochastic configuration network based on chaotic sparrow search algorithm. Knowl-Based Syst 220:106924. https://doi.org/10.1016/j.knosys.2021.106924
Zhu Y, Yousefi N (2021) Optimal parameter identification of PEMFC stacks using adaptive sparrow search algorithm. Int J Hydrog Energy 46:9541–9552. https://doi.org/10.1016/j.ijhydene.2020.12.107
Acknowledgements
This work was supported by the National Water Pollution Control and Treatment Science and Technology Major Special Project (NO. 2018ZX07601001), the Special project of guiding local science and technology development by the central government of Liaoning Province (NO. 2021010211-JH6/105).
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors declare that they have no conflicts of interest to report regarding the present study.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Hu, Y., Lyu, L., Wang, N. et al. Application of machine learning model optimized by improved sparrow search algorithm in water quality index time series prediction. Multimed Tools Appl 83, 16097–16120 (2024). https://doi.org/10.1007/s11042-023-16219-7
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11042-023-16219-7