This study addresses the critical challenge of assessing the quality of groundwater and surface water, which are essential resources for various societal needs. The main contribution of this study is the application of machine learning models for evaluating water quality, using a national database from Mexico that includes groundwater, lotic (flowing), lentic (stagnant), and coastal water quality parameters. Notably, no comparable water quality classification system currently exists. Five advanced machine learning techniques were employed: extreme gradient boosting (XGB), support vector machines, K-nearest neighbors, decision trees, and multinomial logistic regression. The performance of the models was evaluated using the accuracy, precision, and F1 score metrics. The decision tree models emerged as the most effective across all water body types, closely followed by XGB. Therefore, the decision tree models were integrated into the AQuA-P software, which is currently the only software of its kind. It is recommended that these innovative water classification models be used through the AQuA-P software to facilitate informed decision-making in water quality management. This software provides a probability-based classification system that contributes to a deeper understanding of water quality dynamics. Lastly, an open-access repository containing all the datasets and Python notebooks used in our analysis is provided, allowing for easy adaptation and implementation of our methodology for other datasets worldwide.
Read full abstract