Optimization of Village Grouping Using Comparison of K-Means and K-Medoids Methods
DOI:
https://doi.org/10.34148/teknika.v14i2.1248Keywords:
Clustering , K-Means, K-Medoids, Village, Min-max, Sum of Squared Errors (SSE)Abstract
Sumenep Regency is the largest agricultural area in Madura and a major producer of food crops such as rice, corn, and vegetables. However, agricultural productivity in some areas has declined due to uneven fertilizer distribution and limited knowledge about plant diseases and their treatment. To address this, a village clustering system is needed to help the Agriculture Office identify areas with high and low productivity, enabling more targeted assistance and resource allocation. This study aims to classify villages based on agricultural productivity to support better decision-making in agricultural development. Two clustering methods, K-Means and K-Medoids, were applied and compared. K-Means determines cluster centers based on the average of data points, while K-Medoids selects the most representative data point within each cluster. The data used in this research is 690 datasets in 2023. Before clustering is carried out, the data is preprocessed first. Data Pre-processing steps include data transformation, label encoding, imputation, and Min-Max normalization. Cluster optimization was performed using the Sum of Squared Errors (SSE) method. The results show that K-Medoids offers more stable clustering, especially in the presence of outliers, while K-Means is more efficient in computation. The best clustering result was achieved using K-Means with five clusters (K = 5), producing the lowest SSE value of 29.8. These findings can assist local governments in prioritizing agricultural support based on village productivity profiles.
Downloads
References
[1] E. Rahmanita, Y. D. P. Negara, Y. Kustiyahningsih, V. Sasmeka, and B. K. Khotimah, “Implementasi Metode Naïve Bayes dan Information Gain Untuk Klasifikasi Penyakit dan Hama Tanaman Jagung,” Teknika, vol. 12, no. 3, pp. 198–204, 2023, doi: 10.34148/teknika.v12i3.684.
[2] T. Terttiaavini, “A Hybrid Approach Using K-Means Clustering and the SAW Method for Evaluating and Determining the Priority of SMEs in Palembang City”, INSYST, vol. 6, no. 1, pp. 46–53, Apr. 2024.
[3] Y. D. Darmi and A. Setiawan, “Penerapan Metode Clustering K-Means Dalam Pengelompokan Penjualan Produk,” J. Media Infotama, vol. 12, no. 2, pp. 148–157, 2017, doi: 10.37676/jmi.v12i2.418.
[4] D. Marlina, N. Lina, A. Fernando, and A. Ramadhan, “Implementasi Algoritma K-Medoids dan K-Means untuk Pengelompokkan Wilayah Sebaran Cacat pada Anak,” J. CoreIT J. Has. Penelit. Ilmu Komput. dan Teknol. Inf., vol. 4, no. 2, p. 64, 2018, doi: 10.24014/coreit.v4i2.4498.
[5] Y. Kusnadi and M. S. Putri, “Clustering Menggunakan Metode K-Means Untuk Menentukan Prioritas Penerima Bantuan Bedah Rumah (Studi Kasus : Desa Ciomas Bogor),” J. Teknol. Inform. dan Komput., vol. 7, no. 1, pp. 17–24, 2021, doi: 10.37012/jtik.v7i1.498.
[6] R. A. Farissa, R. Mayasari, and Y. Umaidah, “Perbandingan Algoritma K-Means dan K-Medoids Untuk Pengelompokkan Data Obat dengan Silhouette Coefficient di Puskesmas Karangsambung,” J. Appl. Informatics Comput., vol. 5, no. 2, pp. 109–116, 2021, doi: 10.30871/jaic.v5i1.3237.
[7] N. T. Hartanti, “Metode Elbow dan K-Means Guna Mengukur Kesiapan Siswa SMK Dalam Ujian Nasional,” J. Nas. Teknol. dan Sist. Inf., vol. 6, no. 2, pp. 82–89, 2020, doi: 10.25077/teknosi.v6i2.2020.82-89.
[8] A. Winarta and W. J. Kurniawan, “Optimasi cluster k-means menggunakan metode elbow pada data pengguna narkoba dengan pemrograman python,” J. Tek. Inform. Kaputama, vol. 5, no. 1, pp. 113–119, 2021.
[9] F. Marisa, S. S. S. Ahmad, Z. I. M. Yusof, Fachrudin, and T. M. A. Aziz, “Segmentation model of customer lifetime value in Small and Medium Enterprise (SMEs) using K-Means Clustering and LRFM model,” Int. J. Integr. Eng., vol. 11, no. 3, pp. 169–180, 2019, doi: 10.30880/ijie.2019.11.03.018.
[10] A. Winarta and W. J. Kurniawan, “Optimasi cluster k-means menggunakan metode elbow pada data pengguna narkoba dengan pemrograman python,” J. Tek. Inform. Kaputama, vol. 5, no. 1, pp. 113–119, 2021.
[11] B. K. Khotimah, F. Agustina, O. R. Puspitarini, A. D. Cahyani, Y. Kustiyahningsih, and D. R. Anamisa, “Hyperparameters and Centroid Improvements in the K-Medoids Method for Grouping Processed Beef SMEs,” Commun. Math. Biol. Neurosci., vol. 2024, pp. 1–21, 2024, doi: 10.28919/cmbn/8369.
[12] A. R. Ismail, N. Z. Abidin, and M. K. Mean, “Systematic Review on Missing Data Imputation Techniques with Machine Learning Algorithms for Healthcare,” Journal of Robotics and Control, Vol. 3, No. 2, pp. 143–152, 2022, https://doi.org/10.18196/jrc.v3i2.13133.
[13] R. Supardi and I. Kanedi, “Implementasi Metode Algoritma K-Means Clustering pada Toko Eidelweis,” J. Teknol. Inf., vol. 4, no. 2, pp. 270–277, 2020, doi: 10.36294/jurti.v4i2.1444.
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Teknika

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.















