# Water Quality Evaluation and Analysis by Integrating Statistical and Machine Learning Approaches
## 4 Results and Discussion
### Feature Importance Analysis Results  
The bar chart in Figure 9 illustrates normalized feature importance for regression (Decision Tree) and classification (Random Forest) models. Normalization ensures direct comparability across models and datasets.  
* Dissolved oxygen (DO) has the highest relevance score (1.000) in both models, making it the most influential predictor.
* Ammoniacal nitrogen (AN) ranks second with a cumulative importance score of 0.565.
* COD and BOD have moderate importance scores (0.253 and 0.158, respectively).
* pH and TSS exhibit negligible importance (0.013 and 0.000), indicating minimal influence on model predictions.  
Table 1 presents comprehensive feature significance scores for each feature in both regression and classification tests. The feature DO has a significance score of 1.000 for both regression and classification models, indicating that it is the most influential feature in both types of models.  
Figure 9: Normalized feature importance.  
The attribute of interest, AN, demonstrates crucial significance, especially in the classification model with a value of 0.824. However, it also exhibits a considerable level of importance in the regression model, with a value of 0.306. The relevance score of COD in the classification model is 0.496, which is higher than the value of 0.010 in the regression model. This suggests that COD has a more relevant function in classification tasks. Similarly, the variable BOD has a greater significance in classification, with a value of 0.279, compared to its significance in regression, which is only 0.037. However, the overall influence of BOD is still lower than that of COD. Both pH and TSS have negligible relevance ratings, with scoring 0 in both models, indicating that these features have no major impact on the model's predictions.  
The significance of DO and AN causes more precise and detailed data on these parameters to be gathered to improve the performance of the model. Moreover, gaining knowledge about their precise thresholds and how they interact with other aspects can offer more profound understanding of the dynamics of water quality. The divergent significance scores observed in regression and classification tests indicate that distinct models can potentially gain advantages from tailored feature selection and engineering. For instance, the regression model can be enhanced by prioritizing the variable DO, while classification models can gain from a more equitable evaluation of DO, AN, COD, and BOD. The pH and TSS have negligible influence on predictions. Reevaluating the importance of these features and potentially removing the water quality parameters can simplify the model, unless domain knowledge suggests they have significant nonlinear effects. This approach enhances model efficiency and ensures that critical relationships in the data are preserved. Gaining an understanding of the crucial features enables focused and specific feature engineering. For example, by merging COD and BOD, a new characteristic can be created to measure the levels of organic pollution. Additionally, interaction terms between DO and AN can help capture more intricate correlations within the data.  
These findings are consistent with prior research on Malaysian and Southeast Asian rivers. For instance, ref. [46] reported DO, AN, and BOD as the most significant predictors in classifying WQI using RF and Gradient Boosting in the Kelantan River Basin. Similarly, ref. [47] highlighted DO and TSS as dominant contributors to WQI classification in the Kim Hai irrigation system in Vietnam. The alignment of our results with these studies supports the ecological relevance of DO and AN across multiple hydrological contexts. The low importance of pH and TSS also agrees with findings from [48], who found that parameters such as turbidity and DO were more influential than pH in tree-based predictive models.