Optimasi K-Means dengan Algoritma Genetika untuk Target Pemamfaat Air Bersih Provinsi Riau


  • taslim taslim Universitas Lancang Kuning
  • Dafwen Toresa Universitas Lancang Kuning
  • Deny Jollyta Institut Bisnis dan Teknologi Pelita Indonesia
  • Des Suryani Universitas Islam Riau
  • Eka Sabna STMIK Hangtuah


klasterization, k-means, optimization, genetics, validity


Clean water is an important thing in human life. Several actions have been taken by the government to meet the clean water needs of the Riau province. One of them is the Community Based Drinking Water and Sanitation Provision program. Before carrying out activities related to the provision of clean water to the community, the targets to be achieved for the provision of clean water in the future will be determined. This study aims to klaster clean water beneficiary targets using the k-means algorithm with an optimization of the centroid value using a genetic algorithm. Average silhouette number is used to get the optimal number of klasters, which is two klasters. The results of klaster validity were measured using the Davies Bouldin Index (DBI) method where klasterization without optimization resulted in a DBI of 2.164763 and the results of klasterization by carrying out genetic optimization on the centroid value resulted in a DBI value of 2.06894. 


A. V. Kulinkina et al., “Piped water consumption in Ghana: A case study of temporal and spatial patterns of clean water demand relative to alternative water sources in rural small towns,” Sci. Total Environ., vol. 559, pp. 291–301, 2016, doi: 10.1016/j.scitotenv.2016.03.148.

P. Vora and B. Oza, “A Survey on K-mean Klastering and Particle Swarm Optimization,” Int. J. Sci. Mod. Eng., vol. 1, no. 3, pp. 24–26, 2013, [Online]. Available: http://citeseerx.ist.psu.edu/messages/downloadsexceeded.html.

P. Fränti and S. Sieranoja, “How much can k-means be improved by using better initialization and repeats?,” Pattern Recognit., vol. 93, pp. 95–112, 2019, doi: 10.1016/j.patcog.2019.04.014.

S. K. Majhi and S. Biswal, “Optimal klaster analysis using hybrid K-Means and Ant Lion Optimizer,” Karbala Int. J. Mod. Sci., vol. 4, no. 4, pp. 347–360, 2018, doi: 10.1016/j.kijoms.2018.09.001.

S. Kapil, M. Chawla, and M. D. Ansari, “On K-means data klastering algorithm with genetic algorithm,” 2016 4th Int. Conf. Parallel, Distrib. Grid Comput. PDGC 2016, pp. 202–206, 2016, doi: 10.1109/PDGC.2016.7913145.

A. A. Hussein, “Improve The Performance of K-means by using Genetic Algorithm for Classification Heart Attack,” Int. J. Electr. Comput. Eng., vol. 8, no. 2, p. 1256, 2018, doi: 10.11591/ijece.v8i2.pp1256-1261.

Mayasari, T. R., “Klastering Akses Air Bersih Dan Sanitasi Layak ( Klastering of Clean Water access and Worth Sanitation in District / City Lampung Province ),” Fungsional Stat. Pertama BPS Kabupaten Pesawaran, pp. 563–572, 2019.

H. S. Savitri, “Implementasi Importance Performance Analysis dan Algoritma K-means untuk Wilayah Indonesia,” J. Mat. Stat. dan Komputasi, vol. 15, no. 1, p. 97, 2018, doi: 10.20956/jmsk.v15i1.4428.

Z. Long, G. Xu, J. Du, H. Zhu, T. Yan, and Y. Yu, “Flexible Subspace Klastering : A Joint Feature Selection and K-Means Klastering Framework,” Big Data Res., vol. 23, p. 100170, 2021, doi: 10.1016/j.bdr.2020.100170.

P. Govender and V. Sivakumar, Application of k-means and hierarchical klastering techniques for analysis of air pollution: A review (1980–2019), vol. 11, no. 1. Turkish National Committee for Air Pollution Research and Control, 2020.

S. S. Yu, S. W. Chu, C. M. Wang, Y. K. Chan, and T. C. Chang, “Two improved k-means algorithms,” Appl. Soft Comput. J., vol. 68, pp. 747–755, 2018, doi: 10.1016/j.asoc.2017.08.032.

S. Chakraborty and S. Das, “Simultaneous variable weighting and determining the number of klasters—A weighted Gaussian means algorithm,” Stat. Probab. Lett., vol. 137, pp. 148–156, 2018, doi: 10.1016/j.spl.2018.01.015.

H. Kim, H. K. Kim, and S. Cho, “Improving spherical k-means for document klastering: Fast initialization, sparse centroid projection, and efficient klaster labeling,” Expert Syst. Appl., vol. 150, p. 113288, 2020, doi: 10.1016/j.eswa.2020.113288.

H. Xie et al., “Improving K-means klastering with enhanced Firefly Algorithms,” Appl. Soft Comput. J., vol. 84, p. 105763, 2019, doi: 10.1016/j.asoc.2019.105763.

Y. Lu, B. Cao, C. Rego, and F. Glover, “A Tabu search based klastering algorithm and its parallel implementation on Spark,” Appl. Soft Comput. J., vol. 63, pp. 97–109, 2018, doi: 10.1016/j.asoc.2017.11.038.

A. Viloria and O. B. P. Lezama, “Improvements for determining the number of klasters in k-means for innovation databases in SMEs,” Procedia Comput. Sci., vol. 151, no. 2018, pp. 1201–1206, 2019, doi: 10.1016/j.procs.2019.04.172.

J. Nasiri and F. M. Khiyabani, “A whale optimization algorithm (WOA) approach for klastering,” Cogent Math. Stat., vol. 5, no. 1, pp. 1–13, 2018, doi: 10.1080/25742558.2018.1483565.

S. Phon-Amnuaisuk and T. W. Au, “Computational Intelligence in Information Systems: Proceedings of the Fourth INNS Symposia Series on Computational Intelligence in Information Systems (INNS-CIIS 2014),” Adv. Intell. Syst. Comput., vol. 331, 2015, doi: 10.1007/978-3-319-13153-5.

S. Kapoor, I. Zeya, C. Singhal, and S. J. Nanda, “A Grey Wolf Optimizer Based Automatic Klastering Algorithm for Satellite Image Segmentation,” Procedia Comput. Sci., vol. 115, pp. 415–422, 2017, doi: 10.1016/j.procs.2017.09.100.

T. Bhoskar, O. K. Kulkarni, N. K. Kulkarni, S. L. Patekar, G. M. Kakandikar, and V. M. Nandedkar, “Genetic Algorithm and its Applications to Mechanical Engineering: A Review,” Mater. Today Proc., vol. 2, no. 4–5, pp. 2624–2630, 2015, doi: 10.1016/j.matpr.2015.07.219.

M. Jahandideh-Tehrani, “A comparison of particle swarm optimization and genetic algorithm for daily rainfall‑runoff modelling a case study for Southeast Queensland, Australia.pdf,” Optim. Eng., 2020, doi: 10.1007/s11081-020-09538-3.

X. Feng, X. Zhang, and Y. Xiang, “An inconsistency assessment method for backup battery packs based on time-series klastering,” J. Energy Storage, vol. 31, no. August, 2020, doi: 10.1016/j.est.2020.101666.

D. A. I. C. Dewi and D. A. K. Pramita, “Analisis Perbandingan Metode Elbow dan Silhouette pada Algoritma Klastering K-Medoids dalam Pengelompokan Produksi Kerajinan Bali,” Matrix J. Manaj. Teknol. dan Inform., vol. 9, no. 3, pp. 102–109, 2019, doi: 10.31940/matrix.v9i3.1662.




How to Cite

taslim, taslim, Toresa, D., Jollyta, D., Suryani, D. ., & Sabna, E. (2021). Optimasi K-Means dengan Algoritma Genetika untuk Target Pemamfaat Air Bersih Provinsi Riau. Indonesian Journal of Computer Science, 10(1). Retrieved from http://ijcs.stmikindonesia.ac.id/index.php/ijcs/article/view/366