# Water Quality Evaluation and Analysis by Integrating Statistical and Machine Learning Approaches
## 4 Results and Discussion
### Principal Component Analysis (PCA) Results
This line increases progressively near the 95% variance barrier, signifying the total variance accounted for by the primary components. The declining magnitude of individual explained variations underscores the diminishing rewards associated with an increasing number of components. Initial components exert greater influence, encapsulating significant underlying patterns in the data, but subsequent components provide diminishing amounts of information. The convergence of the cumulative variance line with the 95% threshold indicates an ideal quantity of principal components for effectively capturing the data while minimizing redundancy and overfitting. Beyond this threshold, further components are inadequately justified as they contribute insignificantly to elucidate the overall variance [51]. This graph clearly demonstrates the efficacy of PCA in diminishing the dataset's dimensionality. It \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Variable** & **PC1** & **PC2** & **PC3** & **PC4** \\ \hline pH & 0.42 & 0.06 & \(-\)0.11 & 0.89 \\ DO & 0.58 & \(-\)0.01 & 0.15 & \(-\)0.04 \\ COD & 0.16 & 0.81 & \(-\)0.13 & \(-\)0.18 \\ BOD & 0.53 & 0.03 & \(-\)0.43 & \(-\)0.14 \\ TSS & 0.19 & 0.56 & 0.57 & 0.22 \\ AN & 0.36 & \(-\)0.10 & \(-\)0.67 & 0.30 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: PCA loading matrix showing contributions of each variable to the first four principal components. offers a visual rationale for choosing a particular number of components to achieve a balance between complexity and information loss. The heatmap depicted in Figure 14 employs a red-to-blue gradient to represent the intensity and direction of correlations. Red hues indicate positive correlations, whilst blue hues denote negative correlations. The color intensity signifies the degree of the correlation coefficient, with darker hues represent stronger connections. Significant positive correlations (0.93 and 0.81) indicate that these variable pairs rise concurrently. These partnerships are characterized by intense red hues. Significant negative correlations (\(-0.69\) and \(-0.63\)) are denoted by deep blue hues, signifying that a rise in one variable corresponds with a decrease in the other. Values approaching zero (0.0025 and \(-0.0024\)) indicate minimal coloration, implying negligible or no substantial linear correlations between the corresponding variable pairs. Robust correlations, whether positive or negative, may indicate possible multicollinearity when these variables are included concurrently in regression models, thereby distorting estimation and compromising model stability. Thorough deliberation is required to choose whether to incorporate both variables in a model or to utilize one variable as a proxy for the other. Elevated correlation coefficients, whether positive or negative, signify fundamental patterns or correlations that may be essential for hypothesis testing or predictive modeling. Variables exhibiting strong positive correlations may pertain to analogous domains or possess shared elements that affect their actions. The scatterplot depicted in Figure 15 illustrates the data distribution inside the space specified by the initial two main components obtained by PCA. Most of the data points are densely grouped near the horizontal axis around zero on both the PC1 and PC2 axes. This clustering indicates that most of the data variability is accounted for by these two components, and numerous observations exhibit comparable scores on these components. Numerous data points have substantial positive or negative scores along the PC1 and PC2 axes. These outliers are distanced from the central cluster, signifying observations having  
Figure 13: The graph of PCA cumulative and individual explained variance. The blue dashed line represents the cumulative proportion of variance. The red dashed horizontal line indicates the threshold for the desired level of explained variance (95%) used to determine the optimal number of components. typical properties relative to most of the data.