Unsupervised learning focuses on extracting patterns, structures, and relationships from the input data without labeled outputs . Instead of targeting predefined targets, unsupervised learning algorithms (such as K-means and dimensionality reduction techniques) discover inherent structures within the data. For instance, K-means groups similar data on the basis of their intrinsic features (Moodley and van der Haar, 2019). Dimensionality reduction techniques including principal component analysis (PCA) simplify complex datasets by preserving their essential characteristics . In drinking water research, unsupervised learning is crucial in tasks such as clustering bacteria , simplifying data for subsequent analysis , and analyzing raw data to identify key parameters affecting water quality .