# WaQuPs: A ROS-Integrated Ensemble Learning Model for Precise Water Quality Prediction
## 6 Discussion  
In this research, we successfully crafted a water quality prediction system named WaQuPs. The dataset, comprising 267 entries and encompassing 16 physical and chemical parameters, was sourced from the Jakarta Open Data site [22]. Employing advanced machine learning techniques, particularly ensemble learning, we aimed to categorize water quality into nuanced levels: potato, lightly polluted, moderately polluted, and heavily polluted. WaQuPs was developed with Random Forest as the primary model, and we further explored alternative ensemble models, such as XGBoost and CatBoost, comparing their performance. To address potential imbalances in the dataset, we implemented the random oversampling (ROS) technique. The implementation of random oversampling (ROS) to tackle data imbalances has proven to notably enhance recall values, as illustrated in Table 7. In addition to its positive impact on recall, the integration of ROS with the Random Forest model has consistently shown an across-the-board improvement in accuracy, positioning it as the leading model across multiple studies [9; 43]. This substantiates the efficacy of ROS in addressing imbalances within the classification of the dataset highlighted in [44]. The comparison of our primary ensemble learning model, Random Forest, with alternative models such as XGBoost and CatBoost involved two scenarios: one employing default parameters and the other incorporating hyperparameter tuning. The analysis of accuracy values in this study consistently demonstrates the superior performance of Random Forest compared to CatBoost and XGBoost, both before and after hyperparameter tuning. Specifically, Random Forest achieved an accuracy of 83%, precision of 82%, recall of 83%, and an F1-score of 82%, as detailed in Tables 8 and 9. This superiority is attributed to Random Forest's inherent advantages in mitigating overfitting, as highlighted in the works of [PERSON] et al. and [PERSON] et al. [38; 45]. Our research stands out in comparison to prior studies in the field of water quality detection, as indicated in Table 10. This superior performance not only underscores our positive contribution to advancing water quality prediction but also emphasizes the successful development of WaQuPs. This comprehensive system includes both a web application and a mobile application, achieved through the seamless integration of machine learning principles and the strategic utilization of the Internet of Things (IoT) concept. Nevertheless, it is imperative to acknowledge that the performance of predictive models is influenced significantly by various factors, such as data quality and complexity. Effectively addressing these aspects and selecting appropriate classification algorithms play a pivotal role in enhancing the accuracy and overall effectiveness of water quality predictions. learning and IoT. In order to advance further research, we have several aspirations aimed at refining and expanding the scope of our study:  
1. Enhancing Real-Time Data Integration: A primary focus lies in augmenting our system by integrating real-time data sourced from sensors. This endeavor seeks to reinforce the accuracy and immediacy of our water quality prediction system (WaQuPs), enabling a more comprehensive and dynamic assessment of water quality conditions. 2. Comparative Assessment of Pollution Standards: Our ambition extends to comparing our system's performance using the pollution index method aligned with Indonesian regulations to the CCME standards, a globally recognized benchmark. This comparative analysis aims to evaluate the efficacy and alignment of our predictive model with international standards, contributing to its robustness and adaptability beyond regional frameworks. 3. Implementation of Public Alert Mechanism: Should the integration of real-time sensor data be realized, a novel feature in our system will involve the provision of warning signals to the public when the water quality index indicates a significant decline.