Penerapan Algoritma K-Means dan DBSCAN Untuk Segmentasi Pelanggan pada Data Transaksi E-Commerce
DOI:
https://doi.org/10.54259/jdmis.v4i2.7813Keywords:
clustering, K-Means, DBSCAN, e-commerce, Customer Segmentation, Segmentasi PelangganAbstract
This study aimed to perform customer segmentation on e-commerce transaction data using K-Means and Density-Based Spatial clustering of Applications with noise (DBSCAN) algorithms. Transaction data were transformed using the Recency, Frequency, and Monetary (RFM) model and normalized using the Min-max scaling method. The performance of both algorithms was evaluated based on the silhouette score, the number of generated clusters, and computational time efficiency. The experimental results indicated that the K-Means algorithm was superior and more functional for customer segmentation on this dataset, successfully forming two stable clusters with an instant processing time of 0.004 seconds. Conversely, the DBSCAN algorithm failed to perform proper segmentation by generating only a single cluster, despite producing a mathematically higher silhouette score of 0.427. Additionally, this study implemented a web-based simulation system using the Flask framework to facilitate the visualization of segmentation results. This study concluded that the K-Means algorithm was the most adaptive and recommended method to support business decision-making.
Downloads
References
R. W. Sembiring Brahmana, F. A. Mohammed, and K. Chairuang, “Customer Segmentation Based on RFM Model Using K-Means, K-Medoids, and DBSCAN Methods,” Lontar Komputer : Jurnal Ilmiah Teknologi Informasi, vol. 11, no. 1, p. 32, Apr. 2020, doi: 10.24843/lkjiti.2020.v11.i01.p04.
A. S. Paramita and T. Hariguna, “Comparison of K-Means and DBSCAN Algorithms for Customer Segmentation in e-commerce,” Journal of Digital Market and Digital Currency, vol. 1, no. 1, pp. 43–62, Jun. 2024, doi: 10.47738/jdmdc.v1i1.3.
C. Poonsin and P. Boonma, “EFFICIENT SEGMENTATION OF CUSTOMERS BASED ON RFM ANALYSIS”, Data Science and Engineering (DSE) RECORD, March. 2025, [Online]. Tersedia: https://datascience.cmu.ac.th/storage/articles/ 74.pdf [Diakses: 05 Juli 2025].
J. M. John, O. Shobayo, and B. Ogunleye, “An Exploration of clustering Algorithms for Customer Segmentation in the UK Retail Market,” Analytics, vol. 2, no. 4, pp. 809–823, Oct. 2023, doi: 10.3390/analytics2040042.
A. Aglasia and I. Agus, “Unveiling Hidden Customer Segments in e-commerce Using DBSCAN clustering on Demographic and Behavioral Insights,” International Journal for Applied Information Management, vol. 4, no. 3, pp. 128–140, 2024, doi: 10.47738/ijaim.v4i3.85.
H. Qing, J. Zhang, and D. Fu, “Data Mining Technology in Business Data Analysis,” in Journal of Physics: Conference Series, IOP Publishing Ltd, Apr. 2021. doi: 10.1088/1742-6596/1852/2/022045.
H. Ramadhan, M. Rizal Abdan Kamaludin, M. Alfan Nasrullah, and D. Rolliawati, “Comparison of Hierarchical, K-Means and DBSCAN clustering Methods for Credit Card Customer Segmentation Analysis Based on Expenditure Level”, Journal of Applied Informatics and Computing (JAIC), December 2023, [Online]. Tersedia: https://jurnal.polibatam.ac. id/index.php/JAIC/article/view/5790/2143 [Diakses: 12 September 2025]
H. Kilari, S. Edara, G. Ratna Sai Yarra, and D. Varma Gadhiraju, “Customer Segmentation using K-Means clustering”, International Journal of Engineering Research & Technology (IJERT), March 2022, [Online]. Tersedia: https://www.ijert.org/research/customer-segmentation-using-k means clustering-IJERTV11IS030152.pdf [Diakses: 12 September 2025].
H. Saragih and J. Manurung, “Customer segmentation analysis using DBSCAN method in marketing research of retail company.”
R. Martiansah, S. Monalisa, F. Muttakin, and M. Fronita, “Customer Segmentation Analysis Through RFM-D Model and K-Means Algorithm,” 2025.
D. A. Awaliyah, Budi Prasetiyo, R. Muzayanah, and A. D. Lestari, “Optimizing Customer Segmentation in Online retail Transactions through the Implementation of the K-Means clustering Algorithm,” Scientific Journal of Informatics, vol. 11, no. 2, pp. 539–548, Jun. 2024, doi: 10.15294/sji.v11i2.6137.
A. L. M. Tampubolon, T. M. E. Y. Butar Butar, and S. Rochimah, “Segmentasi Pelanggan Majalah pada Situs Web e-commerce dengan K-Means++ dan Metode RFM,” Jurnal Teknologi Informasi dan Ilmu Komputer, vol. 11, no. 6, pp. 1243–1252, Dec. 2024, doi: 10.25126/jtiik.2024118208.
C. Hafidz Ardana et al., “Segmentasi Pelanggan Penjualan Online Menggunakan Metode K-Means clustering,” 2024.
J. Homepage, M. F. Fadhillah, A. Lovely, A. Suyoso, and I. Puspitasari, “MALCOM: Indonesian Journal of Machine Learning and Computer Science Customer Segmentation with clustering Algorithm Based on Recency, Frequency, and Monetary (RFM) Attributes Segmentasi Pelanggan dengan Algoritma clustering Berdasarkan Atribut Recency, Frequency dan Monetary (RFM),” vol. 5, no. 1, pp. 48–56, 2025, doi: 10.57152/malcom.v5v1.1491.
R. Fitriyanto, “Optimalisasi Pengelompokkan Konsumen dengan Multi Internal Metric Validation dan Boxplot Analysis,” Journal of Big Data Analytic and Artificial Intelligence, vol. 8, no. 1, pp. 16–21, 2025.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Howard Chen, Joni, Devi

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).
























