# Dissolved Oxygen Modeling by a Bayesian-Optimized Explainable Artificial Intelligence Approach
## 4 Model Application and Results
### Interpretation Analysis  
A critical goal of this study is to explore the interaction between DO and different water quality and hydrological parameters. For this purpose, we employ the Shapley Additive Explanation (SHAP) method to explain the model predictions. This approach adopts the concept of Shapley values from cooperative game theory to distribute a model's prediction among the input features, measuring each feature's contribution to the final prediction [41]. The Shapley value \(\varphi\) of the \(i\)th feature for the query point \(x\) is defined by the following value function \(v\):  
\[\varphi_{i}(v_{x})=\frac{1}{M}\sum_{S\subseteq\Omega\setminus\{i\}}\frac{v_{x} (S\cup\{i\})-v_{x}(S)}{(M-1)!}(|S|!(M-|S|-1)!) \tag{16}\]  
where \(M\) = number of features, \(\Omega\) = set of all features, \(|S|\) = cardinality of the set \(S\), and \(v_{x}(S)\) = value function of the features in a set \(S\) for the query point \(x\).  
Figure 7 shows the SHAP summary plot for the ML model. The \(x\)-axis displays the Shapley values for each data point, colored by the value of the corresponding feature parameter. The \(y\)-axis ranks the predictors based on their influence on the DO concentration. Positive Shapley values indicate a positive impact on DO predictions, while negative values indicate a negative impact. The varying spread of points across different predictors reflects the range of their influence on the model's predictions. For instance, predictors with wider spreads exhibit a broader range of influence, indicating greater sensitivity. Temperature is a dominant influencing factor, exhibiting a substantial negative impact on DO concentration, which is consistent with the study by [PERSON] et al. [36]. Higher temperatures (yellow dots) correspond to negative Shapley values, indicating decreased DO levels. Conversely, lower temperatures (blue dots) show increased DO levels. Two factors presumably cause this. First, higher temperatures lead to faster movement of water molecules, reducing the ability of water to hold gases like oxygen. Second, metabolic rates of aquatic organisms often increase as temperatures rise [42], resulting in higher oxygen consumption. The parameters \(G\) and \(Q\) show comparative effects on DO, which may be attributed to the inherent correlation between \(G\) and \(Q\). Higher gage height often correlates with higher discharge. Increased \(Q\) can enhance the aeration of water as it moves over rocks and other obstacles, introducing more oxygen into the water. As a result, \(G\) and \(Q\) play an essential role in DO concentration.  
Figure 6: Cumulative frequency of absolute relative error.  
The parameters \(Sc\), \(Tu\), and pH are less dominant than others in determining DO. They indirectly affect DO levels through their impact on water chemistry and aquatic life. Higher \(Sc\) indicates higher levels of dissolved salts and pollutants, which influence the overall health of the aquatic ecosystem and potentially impact DO levels [43]. High \(Tu\) reduces light penetration, affecting photosynthesis by aquatic plants and algae, which produce oxygen. Extreme pH levels can affect the health of aquatic organisms and the chemical processes in water, potentially impacting DO levels. However, these effects are insignificant [44].