Modeling Total Alkalinity in Aquatic Ecosystems by Decision Trees: Anticipation of pH Stability and Identification of Main Contributors
Hichem Tahraoui, Rachida Bouallouche, Kamilia Madi, Oumnia Rayane Benkouachi, Reguia Boudraa, Hadjar Belkacemi, Sabrina Lekmine, Hamza Moussa,
Centre National de la Recherche Scientifique · University of Sciences and Technology Houari Boumediene
Key points
From the paper's conclusion- 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.
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.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Operational early-warning forecasts of aquaculture water quality: Interpretable ML for TDS under walk-forward validationEcological Informatics · 2026
- Enhancing public water management through interpretable machine learning: A random forest-SHAP analysis of spatio-temporal pH predictionDesalination and Water Treatment · 2026
- An integrated chemical and ecological framework for deriving freshwater contaminant protection thresholds using machine learning.Environmental pollution (Barking, Essex : 1987) · 2026
- Hyperparameter-optimized deep learning for next-day pH forecasting in distributed water quality monitoring systemsScientific Reports · 2026
- Tree-Based Machine Learning Models for Predicting Phosphate Adsorption Performance of Layered Double Hydroxides: Insights Into Mechanisms and Process Optimization.Water environment research : a research publication of the Water Environment Federation · 2026
- Uncertainty-guided adaptive transfer learning for cross-domain prediction of disinfection by-product formation in complex water matrices.Water research · 2026