# WaQuPs: A ROS-Integrated Ensemble Learning Model for Precise Water Quality Prediction
###### Abstract
Among the classification algorithms employed in this research, Random Forest was included. However, it is noteworthy that Random Forest achieved an accuracy value of only 76% in this particular study. Furthermore, [PERSON] et al. [6] conducted a comprehensive exploration and analysis of 17 novel input features. Their goal was to formulate an enhanced water quality index (WQI) capable of adapting to the land use activities surrounding the river. For model selection, the researchers employed five regression algorithms--specifically, Random Forest, AdaBoost, Support Vector Regression, Decision Tree Regression, and Multilayer Perceptron. Among these algorithms, Random Forest exhibited superior prediction performance. This study introduced a modified Random Forest method that incorporated the synthetic minority oversampling technique, yielding accuracy values reaching 77.68%. While [PERSON] et al. [5] and [PERSON] et al. [6] classified water into five distinct classes in their research, it is noteworthy that the accuracy rate fell slightly below the 80% benchmark. To address these challenges, we developed a water quality prediction system (WaQuPs), a sophisticated solution tackling the intricacies of water quality assessment employing advanced machine learning, including an ensemble learning model. WaQuPs categorizes water quality into nuanced levels: potable, lightly polluted, moderately polluted, and heavily polluted, aligning with the guidelines set by Government Regulation 82 of 2001. To ensure rapid and precise dissemination of information, WaQuPs integrates an Internet of Things (IoT)-based communication protocol for the efficient delivery of the detected water quality results. In its development, WaQups leverages ensemble machine learning techniques, specifically combining multiclass classification with random oversampling (ROS) rather than using the synthetic minority oversampling technique (SMOTE) [7], to enhance performance. The main classification algorithm employed in our model is Random Forest, serving as the primary method of analysis. Additionally, we conduct comparative assessments with other ensemble learning algorithms, such as XGBoost and Catboost, to evaluate their effective ness in this context. To optimize our classification model, we implement cross-validation techniques and carry out hyperparameter tuning. The adoption of ensemble machine learning in our study is driven by its acknowledged superiority over classical machine learning methodologies. The primary advantage of ensemble learning lies in its utilization of multiple algorithms simultaneously, enhancing overall proficiency and robustness [8; 9]. Moreover, ensemble learning, marked by the fusion of predictions from multiple models, leads to an elevated level of predictive accuracy [10]. This strategic choice is underscored by the findings presented in [PERSON]'s paper [10], where the ensemble learning model demonstrated superior accuracy compared to classical machine learning. In our pursuit of water quality prediction, we embraced ensemble learning and specifically chose Random Forest as the primary model to handle multi-class classification cases. This decision was informed by insights extracted from prior research, as referenced in research by [PERSON] et al. [4]. Previous studies have underscored Random Forest's superiority within ensemble learning, exhibiting higher accuracy values in determining water quality into two classes [4]. Moreover, Random Forest has demonstrated suitability for handling multi-class classification challenges [11]. It is noteworthy that while Random Forest has proven effective for multi-class classification, it has been underutilized in water quality studies. We found only two studies [5; 6] which to date have explored its application in solving multi-class cases within the realm of water quality. For comparative analysis, we selected the XGBoost and CatBoost models, both falling within the ensemble learning paradigm and chosen based on insights from prior research [3].