Abstract. River water quality needs to be monitored continuously because changes in physicochemical and environmental parameters may indicate early changes in aquatic conditions. This study aims to identify water quality patterns in the Bengawan Solo River using K-Means clustering based on physicochemical and environmental parameters. The dataset consists of 1,753 field observations with attributes including temperature, pH, electrical conductivity, total dissolved solids, water color, odor, and weather condition. The research stages include feature selection, data preprocessing, categorical encoding, Z-score standardization, K-Means clustering, and cluster number evaluation. The number of clusters was tested from K=2 to K=5. Cluster quality was evaluated using Silhouette Score, Davies-Bouldin Index, Calinski-Harabasz Score, and Inertia. After data cleaning, 1,751 observations were used in the clustering process. The evaluation results show that K=2 is the best cluster number, with a Silhouette Score of 0.187638 and a Calinski-Harabasz Score of 456.873808. The clustering results formed two main patterns, namely Cluster 0 with 840 observations or 47.97% and Cluster 1 with 911 observations or 52.03%. Based on average parameter characteristics, Cluster 0 has higher electrical conductivity and TDS values than Cluster 1; therefore, it is interpreted as a higher water quality risk pattern. These results indicate that K-Means can identify initial water quality patterns in an unlabeled Bengawan Solo River dataset.
Copyrights © 2026