Decision Tree Algorithms in Water Quality Classification: A Comparative Study of Random Forest, XGBoost, and C5.0 - Shofiana, Dewi Asiah; Caniadi, Melan; Sholehurrohman, Ridho; Aristoteles (Research Center of Inorganic Materials and Coordination Complexes, FMIPA Universitas Sriwijaya, 2025)
Safe drinking water is more than a convenience; public health officials often call it a cornerstone of survival. United Nations International Children’s Emergency Fund (UNICEF) reported that, shockingly, roughly two billion people still drink water that is neither clean nor tested. Pathogenic bacteria from human feces and livestock waste taint roughly 70% of available sources, creating a silent epidemic. Scientists express water quality into five levels: poor, marginal, fair, good, and excellent – named as the Water Quality Index (WQI) designed by the Canadian Council of Ministers of the Environment (CCME). This research measured the performance of three decision-tree classifiers, including Random Forest, XGBoost, and C5.0 to predict water quality. The preprocessing pipeline was thorough, involving label encoding, use of synthetic minor over-sampling technique (SMOTE) for balancing imbalanced classes, and an exploratory phase to examine outliers and irregularities within the dataset. According to the findings, Random Forest finished at an impressive test result with 98% of accuracy. XGBoost and C5.0 follows close behind at about 96%, but the latter turned out to be the fastest, edging out both XGBoost and Random Forest, making C5.0 a preferable when a time-sensitive or emergency decision is needed. In short, this research highlights the importance of modern preprocessing tools combined with machine learning algorithms in monitoring water quality.