## 3 Results
### Model Performance Evaluation
#### 3.2.2 Performance Results  
Table 1 summarizes the performance of the SVM, K-NN, and RF models based on the evaluation metrics. With regard to the overall model performance, SVM exhibits consistent and commendable performance across all classes, with high accuracy, precision, recall, and AUC values. k-NN demonstrates competitive results, maintaining a balance between precision and recall. Random Forest stands out as the top-performing model, consistently \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Model** & **Class** & **Accuracy** & **Precision** & **Recall** & **F1-Score** & **AUC** \\ \hline SVM & Oil spill & 0.92 & 0.91 & 0.93 & 0.92 & 0.96 \\  & Wastewater & 0.88 & 0.86 & 0.89 & 0.87 & 0.90 \\  & Debris & 0.94 & 0.95 & 0.93 & 0.94 & 0.97 \\ \hline k-NN & Oil spill & 0.85 & 0.84 & 0.87 & 0.85 & 0.88 \\  & Wastewater & 0.89 & 0.88 & 0.90 & 0.89 & 0.92 \\  & Debris & 0.86 & 0.87 & 0.85 & 0.86 & 0.89 \\ \hline RF & Oil spill & 0.94 & 0.93 & 0.95 & 0.94 & 0.97 \\  & Wastewater & 0.92 & 0.91 & 0.93 & 0.92 & 0.95 \\  & Debris & 0.95 & 0.94 & 0.96 & 0.95 & 0.98 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Performance results of SVM, k-NN, and Random Forest for the three pollution classes. Figure 7: Non-polluted scenario sample image. achieving the highest scores in accuracy, precision, recall, F1-score, and AUC for all three pollution classes. SVM performs consistently, with solid precision and recall. k-NN is moderately competent, but trails behind Random Forest and SVM. Lastly, for debris, Random Forest excels in detection, achieving top scores across metrics. SVM maintains consistent performance with high precision and recall. k-NN delivers comparable results, though marginally behind SVM and Random Forest. The choice of the most suitable model depends on the specific requirements of the pollution detection application. In terms of trade-offs, decision-makers may need to balance factors such as precision, recall, and computational complexity based on the priorities of the environmental monitoring system. The environmental impact implications for efficient resource allocation are to understand that the relative strength of each model allows for a more efficient allocation of resources, potentially optimizing the environmental conservation efforts. A detailed breakdown facilitates targeted actions against specific types of pollution, enabling more effective and precise interventions. Random Forest emerges as a robust and reliable choice across all pollution classes, making it well suited for practical deployment in real-world scenarios. In the case of SVM and k-NN, while slightly behind Random Forest, these models still deliver commendable results, and their use may be justified based on specific application requirements. In summary, the study underscores the efficacy of machine learning models, with Random Forest exhibiting excellent overall performance. Considerations for class-specific strengths should guide the selection of models based on the specific pollution challenges faced in river ecosystems. In our quest to detect pollution in river ecosystems using machine learning algorithms, we rigorously evaluated the performance of three distinct models: SVM, k-NN, and RF. To gain deeper insights into their performance, we analyzed the confusion matrices, which provided a granular view of how each model performed in classifying pollution occurrences. The confusion matrix provides a deep interpretation of a model's performance; for example, if the data were unbalanced, namely, skewed towards one class, the model accuracy will provide misleading information and the proposed model may fail to obtain the same level of accuracy when testing with a new, unseen dataset. Additionally, some models may be robust in predicting one class while performing poorly in detecting another class or classes. Therefore, reporting the sensitivity and specificity values are beneficial in this work.