Modeling Total Alkalinity in Aquatic Ecosystems by Decision Trees: Anticipation of pH Stability and Identification of Main Contributors

Total alkalinity (TAC) plays a pivotal role in buffering acid–base fluctuations and maintaining pH stability in aquatic ecosystems. This study presents a data-driven approach to model TAC using decision tree regression, applied to a comprehensive dataset of 454 water samples collected in diverse aquatic environments of the Médéa region, Algeria. Twenty physicochemical parameters, including concentrations of bicarbonates, hardness, major ions, and trace elements, were analyzed as input features. The decision tree algorithm was optimized using the Dragonfly metaheuristic algorithm coupled with 5-fold cross-validation. The optimized model (DT_DA) demonstrated exceptional predictive performance, with a correlation coefficient R of 0.9999, and low prediction errors (RMSE = 0.3957, MAE = 0.3572, and MAPE = 0.4531). External validation on an independent dataset of 68 samples confirmed the model’s robustness (R = 0.9999; RMSE = 0.4223; MAE = 0.3871, and MAPE = 0.4931). The tree structure revealed that total hardness (threshold: 78.5 °F) and bicarbonate concentration (threshold: 421.68 mg/L) were the most influential variables in TAC determination. The model offers not only accurate predictions but also interpretable decision rules, allowing the identification of critical physicochemical thresholds that govern alkalinity. These findings provide a valuable tool for anticipating pH instability and guiding water quality management and protection strategies in freshwater ecosystems.

Authors

Institutions

Publication Details

Journal
Water
Published
2025-10-12
DOI
https://doi.org/10.3390/w17202939
Citations
4
Primary Topic
Hydrological Forecasting Using AI
Type
article
Field-Weighted Citation Impact
3.20

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Modeling Total Alkalinity in Aquatic Ecosystems by Decision Trees: Anticipation of pH Stability and Identification of Main Contributors

Hichem Tahraoui, Hamza Moussa, Yacine Benguerba, Meriem Zamouche et al.
4 citations
Water
Hydrological Forecasting Using AI
3.20
article

Modeling Total Alkalinity in Aquatic Ecosystems by Decision Trees: Anticipation of pH Stability and Identification of Main Contributors

Hichem Tahraoui, Hamza Moussa, Yacine Benguerba, Meriem Zamouche, Hadjar Belkacemi, Oumnia Rayane Benkouachi, Aymen Amine Assadi, Abdeltif Amrane, Mohammad Shamsul Ola, Reguia Boudraa, Nabil Touzout, Rachida Bouallouche, Sabrina Lekmine, Zakaria Triki, Mohammed Kebir, Jie Zhang, Noureddine Nasrallah, Kamilia Madi
article en
4 citations

Abstract

Total alkalinity (TAC) plays a pivotal role in buffering acid–base fluctuations and maintaining pH stability in aquatic ecosystems. This study presents a data-driven approach to model TAC using decision tree regression, applied to a comprehensive dataset of 454 water samples collected in diverse aquatic environments of the Médéa region, Algeria. Twenty physicochemical parameters, including concentrations of bicarbonates, hardness, major ions, and trace elements, were analyzed as input features. The decision tree algorithm was optimized using the Dragonfly metaheuristic algorithm coupled with 5-fold cross-validation. The optimized model (DT_DA) demonstrated exceptional predictive performance, with a correlation coefficient R of 0.9999, and low prediction errors (RMSE = 0.3957, MAE = 0.3572, and MAPE = 0.4531). External validation on an independent dataset of 68 samples confirmed the model’s robustness (R = 0.9999; RMSE = 0.4223; MAE = 0.3871, and MAPE = 0.4931). The tree structure revealed that total hardness (threshold: 78.5 °F) and bicarbonate concentration (threshold: 421.68 mg/L) were the most influential variables in TAC determination. The model offers not only accurate predictions but also interpretable decision rules, allowing the identification of critical physicochemical thresholds that govern alkalinity. These findings provide a valuable tool for anticipating pH instability and guiding water quality management and protection strategies in freshwater ecosystems.

WaterVol. 17(20)
Centre National de la Recherche Scientifique (FR), University of Sciences and Technology Houari Boumediene (DZ), University of Béjaïa (DZ), King Saud University (SA), University of Bouira (DZ), University Ferhat Abbas of Setif (DZ), Institut des Sciences Chimiques de Rennes (FR), Centre de Recherche sur l'Information Scientifique et Technique (DZ), École Nationale Supérieure de Chimie de Rennes (FR), University Yahia Fares of Medea (DZ), Abbès Laghrour University of Khenchela (DZ), Université Constantine 2 (DZ), Université de Rennes (FR), Newcastle University (GB)
King Saud University
Openalex Percentile: Top 8%
Hydrological Forecasting Using AI
3.20
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.