# Water Quality Evaluation and Analysis by Integrating Statistical and Machine Learning Approaches
## 4 Results and Discussion
### Principal Component Analysis (PCA) Results
The horizontal line around zero for PC2, with the most of data points clustered around it, indicates that PC2 contributes less to data variation than PC1, which exhibits a wider dispersion. The scatterplot shows how PCA simplifies data by changing the original variables into new components. PC1, which has a wider spread, probably captures the most important variance in the dataset, whereas PC2 captures some extra variance, but it is not significant. A central cluster along with a few outliers might indicate that there are natural groupings or segments in the data. These might relate to various classifications or categories that are part of the original dataset. A central cluster with a few outliers might indicate that there are some natural groupings or segments in the data. These may relate to various classifications or categories that are part of the original dataset. Figure 14: Heatmap of correlation coefficients between study variables. Figure 15: Scatterplot of principal components **1** and **2**. The relationships and distributions among the first four principal components (PC1, PC2, PC3, and PC4) obtained from principal component analysis are depicted in Figure 16. The emphasis is placed on the orthogonality of these components as well as their contributions to variance. The components jointly account for a considerable amount of the variance in the dataset. The components are selected because they can represent data that are clear and concise while yet delivering useful information. Analyses are performed on six different water quality measures, and the findings of the principal component analysis reveal that the first four components contain the fundamental variability in the data. As a result, these components are the most important components for further interpretation. When the components of the principal component analysis are plotted against one another, it is possible to see how each component is connected to the others, particularly in terms of data distribution and clustering. This makes it possible to identify patterns, such as correlations or independence, among the numerous main components. The diagonal plots illustrate the way the values tend to be distributed across each primary component. The wide range of values that can be seen in graphs such as those for PC1 suggests that this component plays a significant part in explaining the variation in the data. The presence of narrower distributions, which are frequently seen in higher  
Figure 16: Scatterplot matrix of PCA components PC1, PC2, PC3, and PC4. components like PC3 and PC4, indicates that there is less variance being collected. The off-diagonal grids offer scatterplots that illustrate the pairwise relationships that exist between the primary components. Some examples are as follows:  
* The grid comparing PC1 and PC2 reveals distinct clustering patterns, suggesting that these components effectively capture significant groupings within the dataset, possibly related to water quality classifications. The clusters in this plot highlight the separation between observations with varying underlying properties. * The PC1 versus PC3 and PC1 versus PC4 grids display a more dispersed pattern, indicating weaker correlations between these components. This suggests that PC3 and PC4 contribute incremental, rather than major, information compared to PC1. * The PC2 versus PC3 and PC2 versus PC4 grids exhibit random distributions, further emphasizing the diminishing explanatory power of the higher-order components (PC3 and PC4). * The PC3 versus PC4 grid appears more uniformly scattered, confirming that these two components carry minimal overlapping information and are orthogonal. The orthogonality of components, as seen in the lack of discernible trends in the off-diagonal scatterplots, is a critical feature of PCA, ensuring that each principal component contributes unique information to the dataset. Furthermore, the clusters in the PC1 versus PC2 plot indicate natural groupings in the data, which can be associated with distinct water quality classes.