Application of K-Means Clustering on Retail Data for Customer Monetary-Frequency Segmentation
Keywords:
Algorithm, Customer Segmentation, Data Mining, K-Means ClusteringAbstract
The increasing competition in the retail industry requires companies to understand customer behavior more deeply to optimize marketing strategies. Customer segmentation is an essential approach to identify consumer characteristics and design more targeted strategies. This study aims to apply the K-Means Clustering data mining algorithm to segment customers in retail sales data using the Superstore Dataset. The methodology involves preprocessing 9,800 transaction records into 793 unique customer records by extracting Monetary and Frequency attributes. The Elbow Method was then applied to determine the optimal number of clusters. The results indicate that the optimal number of clusters is K=4. The K-Means algorithm successfully classified customers into four segments, namely superstar customers, loyal customers, potential customers, and at-risk customers. These findings provide data-driven insights that can be utilized by companies to design more effective marketing strategies, enhance customer loyalty, and maximize profitability.
References
[1] M. F. Fadhillah, A. L. A. Suyoso, and I. Puspitasari, "Customer Segmentation with Clustering Algorithm Based on Recency, Frequency, and Monetary (RFM) Attributes," MALCOM: Indonesian Journal of Machine Learning and Computer Science, vol. 5, no. 1, pp. 48–56, 2025.
[2] I. Yunita, P. R. Ali, M. A. Kartawidjaja, and R. Sukwadi, "Segmentasi Pelanggan Menggunakan K-Means Clustering: Menganalisis Metrik RFM untuk Strategi Pemasaran," Jurnal Media Teknologi dan Sistem Industri, vol. 9, no. 1, pp. 58-66, 2025.
[3] N. H. Ahsina, F. Fatimah, and F. Rachmawati, "Analisis Segmentasi Pelanggan Bank Berdasarkan Pengambilan Kredit Dengan Menggunakan Metode K-Means Clustering," Jurnal Ilmiah Teknologi Infomasi Terapan, vol. 8, no. 3, 2022.
[4] F. SLN, Basic Data Mining from A to Z Dasar Membangun Tindakan Bisnis. Bandung, 2023.
[5] C. H. Ardana, A. A. A. A. A. Khoyum, and M. Faisal, "Segmentasi Pelanggan Penjualan Online Menggunakan Metode K-means Clustering," JISKA (Jurnal Informatika Sunan Kalijaga), vol. 9, no. 1, pp. 1–9, 2024.
[6] A. M. Artiarno, P. Setiaji, and F. Nugraha, "K-Means Clustering untuk Segmentasi Pelanggan: Mengungkap Pola Pembelian Strategi Pemasaran pada Sektor Ritel," Edumatic J. Pendidikan Informasi, vol. 9, no. 2, pp. 442–451, 2025.
[7] I. Lewaaelhamd, "Customer Segmentation Using Machine Learning Model: An Application of RFM Analysis," Journal of Data Science and Intelligent System, vol. 2, no. 1, pp. 29–36, 2024.
[8] E. Febrianty, L. Awalina, and W. I. Rahayu, "Optimalisasi Strategi Pemasaran dengan Segmentasi Pelanggan Menggunakan Penerapan K-Means Clustering pada Transaksi Online Retail," Jurnal Teknologi dan Informasi (JATI), vol. 13, no. September, pp. 122–137, 2023.
[9] Y. Yonata, H. Maharani, and C. Viona, "Analisis Clustering Pelanggan Berdasarkan Data Transaksi Penjualan Menggunakan Algoritme K-Means dan Metode Recency, Frequency, Monetary (RFM)," Jurnal Telematika, vol. 16, no. 2, pp. 77–84, 2019.
[10] F. Liantoni, Data Mining Dan Penerapan Metode, Eureka Media Akasara, 2022.
[11] R. Sahoo, "Superstore Sales Dataset." [Online]. Available: https://www.kaggle.com/datasets/rohitsahoo/sales-forecasting [Accessed: Jan. 1, 2026].
[12] I. R. Jawara and Z. Fatah, "Penggunaan Data Mining Untuk Memprediksi Penjualan Pada Toko Perlengkapan Bangunan Menggunakan Metode Apriori," Jurnal Ilmiah Multidisiplin Ilmu, vol. 2, no. 1, pp. 52–60, 2025.
[13] R. Surya, "Peningkatan Akurasi OCR dalam Pemrosesan Formulir Keuangan melalui Fine-Tuning Transformer dan Strategi Pra-pemrosesan Data," Jurnal Inovasi Informatika (JII), vol. 7, no. 2, pp. 1–12, 2025.
[18] M. Annas and S. N. Wahab, "Data Mining Methods: K-Means Clustering Algorithms," International Journal Cyber and IT Service Management (IJCITSM), vol. 3, no. 1, pp. 40–47, 2023.
[19] P. Vania, and B. N. Sari, "Perbandingan Metode Elbow dan Silhouette untuk Penentuan Jumlah Klaster yang Optimal pada Clustering Produksi Padi menggunakan Algoritma K-Means," Jurnal Ilmiah Wahana Pendidikan, vol. 9, no. 21, pp. 547–558, 2023.
[20] Amna et al., Data Mining. Padang: PT Global Eksekutif Teknologi, 2023.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Rifqi Rahmatullah

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










