# WaQuPs: A ROS-Integrated Ensemble Learning Model for Precise Water Quality Prediction
###### Abstract  
Water presents challenges in swiftly and accurately assessing its quality due to its intricate composition, diverse sources, and the emergence of new pollutants. Current research tends to oversimplify water quality, categorizing it as potable or not, despite its complexity. To address this, we developed a water quality prediction system (WaQuPs), a sophisticated solution tackling the intricacies of water quality assessment. WaQuPs employs advanced machine learning, including an ensemble learning model, categorizing water quality into nuanced levels: potable, lightly polluted, moderately polluted, and heavily polluted. To ensure rapid and precise dissemination of information, WaQuPs integrates an Internet of Things (IoT)-based communication protocol for the efficient delivery of detected water quality results. In its development, we utilized advanced techniques, such as random oversampling (ROS) for dataset balance. We used a correlation coefficient to select relevant features for the ensemble learning algorithm based on the Random Forest algorithm. Further enhancements were made through hyperparameter tuning to improve the prediction accuracy. WaQuPs exhibited impressive metrics, achieving an accuracy of 83%, precision of 82%, recall of 83%, and an F1-score of 82%. Comparative analysis revealed that WaQuPs with the Random Forest model outperformed both the XGBoost and CatBoost models, confirming its superiority in predicting water quality. Internet of Things; machine learning; water quality prediction; Random Forest; random oversampling +
Footnote †: journal:  
intelligent machine learning and IoT-based biofloc system. This research aimed to enhance efficiency, production, water recycling, and automatic feeding within the aquaculture domain. The system integrates water quality prediction capabilities using advanced machine learning models, including Decision Tree classification and Random Forest. Moreover, real-time monitoring is facilitated through an Android app. The outcomes of this study were highly promising, with Random Forest achieving an impressive accuracy rate of 73.76%. [PERSON] and [PERSON] [3] conducted research on water quality using a multimodal-based machine learning algorithm. The categories used in this research consisted of only two labels, namely potable or not. The researchers utilized the LGBM, Catboost, and XGBoost algorithms to develop an ensemble learning model from a dataset containing metal elements in water. Employing a 10-fold cross-validation approach and fine-tuning the hyperparameters, XGBoost demonstrated the highest accuracy, with an average of 79%. While this study exhibited relatively robust accuracy, there remains room for potential enhancements in this domain. Subsequently, [PERSON] et al. [4] conducted an extensive analysis, evaluating the performance of 15 machine learning models for water quality classification. Similar to prior studies, they classified water quality according to a binary distinction, i.e., potable or non-potable. Following their initial assessment, the top five models exhibiting the highest accuracy were selected and further refined through hyperparameter optimization. Notably, among these models, Random Forest emerged as the top performer, achieving an impressive accuracy rate of 81%. The accuracy value in this research was quite good compared to previous research, namely above 80%. While this accuracy value surpassed that of previous research, exceeding 80%, it is important to note that the classification in this study remained limited to only two categories: potable or not. In another study, [PERSON] et al. [5] addressed the critical issue of declining water quality attributed to rapid urbanization and industrialization, posing considerable health risks. The study considered the application of supervised machine learning algorithms to predict a water quality index (WQI) and a water quality class (WQC) based on four input parameters: temperature, turbidity, pH, and total dissolved solids.