Evaluating K-Means and DBSCAN for E-Commerce Customer Segmentation

Authors

  • Lily Puspa Dewi Department of Informatics, Petra Christian University, East Java, Indonesia
  • Jonathan Febrian Pratignyo Department of Informatics, Petra Christian University, East Java, Indonesia
  • Gregorius Satia Budhi Department of Informatics, Petra Christian University, East Java, Indonesia

DOI:

https://doi.org/10.34148/teknika.v15i3.1547

Keywords:

Customer Segmentation, K-Means, DBSCAN, RFM Analysis, Silhouette Coefficient

Abstract

Customer segmentation based on transaction histories requires consideration of both internal cluster quality and customer coverage. This study evaluated K-Means and DBSCAN using Recency, Frequency, and Monetary (RFM) features from an anonymized Indonesian e-commerce platform. After screening, 3,868 retained orders recorded between June 2021 and June 2023 were aggregated into 2,692 customer profiles. Both algorithms used the same min–max-normalized RFM matrix. Internal validation employed the Silhouette Coefficient, Davies–Bouldin index, and Calinski–Harabasz index. K-Means with K = 3 produced a full-sample Silhouette Coefficient of 0.4169. DBSCAN with ε = 0.13 and min_samples = 5 identified four clusters covering 94.3% of customers and labelled 153 customers as noise. On the matched subset of 2,539 non-noise customers, the Silhouette Coefficients were 0.4350 for K-Means and 0.2017 for DBSCAN. The smallest K-Means cluster contained 15.0% of customers and had the highest mean Frequency and Monetary. Among the DBSCAN clusters, the highest mean Frequency and Monetary occurred in different groups, while the noise group had the highest reported mean Monetary overall. These findings indicate that internal validation should be interpreted alongside customer coverage and the original purchasing profiles of assigned and unassigned customers.

Downloads

Download data is not yet available.

References

[1] Laporan Perekonomian Indonesia 2022. Bank Indonesia, 2022. [Online]. Available: https://www.bi.go.id/id/publikasi/laporan/Pages/LPI_2022.aspx

[2] Fadhilah, “Digitalisasi Sistem Pembayaran Dan Dampaknya Terhadap Inklusi Keuangan Di Indonesia,” Jurnal Ilmu Ekonomi dan Bisnis, vol. 2, no. 2, pp. 13–18, 2025, doi: 10.70134/jukoni.v2i2.457

[3] Southeast Asia’s Digital Consumers: A new stage of evolution. Meta and Bain & Company, 2022. [Online]. Available: https://www.bain.com/globalassets/noindex/2022/meta_bain_syncsea_2022.pdf#page=45

[4] C. A. Samosir, “Strategi Customer Relationship Management Untuk Meningkatkan Retensi Pelanggan Di Era Digital,” Repeater: Publikasi Teknik Informatika dan Jaringan, vol. 3, no. 1, pp. 84–97, 2025, doi: 10.62951/repeater.v3i1.369.

[5] A. Saputra and F. I. Malik, “Segmentasi Pelanggan E-commerce Berbasis Perilaku Transaksi Menggunakan Algoritma K-Means untuk Strategi Pemasaran Bertarget,” COMPUTA: Journal of Computer and Informatics Engineering, vol. 1, no. 2, Nov. 2025, [Online]. Available: https://computa.ipbcirebon.ac.id/index.php/computa/article/view/20

[6] F. I. Sanjaya and A. D. Kalifia, “Precision Marketing Model using Decision Tree on e-Commerce Case Study Orebae.com”, Journal RESTI (Rekayasa Sist. Teknol. Inf.), vol. 7, no. 5, pp. 1033-1039, Sep. 2023, doi: 10.29207/resti.v7i5.4531

[7] A. Razia Sulthana, A. Jaiswal, P. Supraja and L. Sairamesh, "Customer Segmentation Using Machine Learning", in Proc. 3rd International Conference on Advances in Electrical Computing Communication and Sustainable Technologies (ICAECT), 2023, doi: 10.1109/ICAECT57570.2023.10117924

[8] R. U. Upadhyay and N. Choudhary, "A Review of Customer Segmentation Methods," International Journal of Advanced Research in Science, Communication and Technology (IJARSCT), vol. 3, no. 2, pp. 684–692, Mar. 2023, doi: 10.48175/IJARSCT-8904.

[9] H. Chang and A. Mukherjee, “Machine Learning and Consumer Data,” arXiv.org Cornell University, Jun. 2023, doi: 10.48550/arXiv.2306.14118.

[10] G. V. D. Ayyappa Babu and M. D. Sathish, “E-Commerce Customer Segmentation Using Machine Learning,” International Journal for Research in Applied Science and Technology, vol. 10, no. 9, pp. 1275-1277, Sep. 2022, doi: 10.22214/ijraset.2022.46772.

[11] S. S. Mim and D. Logofatu, "A Cluster-based Analysis for Targeting Potential Customers in a Real-world Marketing System," in Proc. IEEE 18th International Conference on Intelligent Computer Communication and Processing (ICCP), Cluj-Napoca, Romania, 2022, pp. 159-166, doi: 10.1109/ICCP56966.2022.10053985.

[12] A. M. Durán-Rosal, P. A. Gutiérrez, F. J. Martínez-Estudillo, and C. Hervás-Martínez, “Simultaneous Optimisation Of Clustering Quality And Approximation Error For Time Series Segmentation,” Information Sciences, vol. 442-443, pp. 186-201, May 2018, doi: 10.1016/J.INS.2018.02.041.

[13] M. Shutaywi and N. N. Kachouie, “Silhouette Analysis for Performance Evaluation in Machine Learning with Applications to Clustering,” Entropy, vol. 23, no. 6, Jun. 2021, doi: 10.3390/E23060759.

[14] R. Punhani, V. P. S. Arora, A. S. Sabitha, and V. K. Shukla, “Segmenting E-Commerce Customer through Data Mining Techniques,” Journal of Physics: Conference Series, vol. 1714, no. 1, Jan. 2021, doi: 10.1088/1742-6596/1714/1/012026.

[15] N. Gholizadeh, H. Saadatfar, and N. Hanafi, “K-DBSCAN: An Improved DBSCAN Algorithm for Big Data,” The Journal of Supercomputing, vol. 77, pp. 6214-6235, Jun. 2021, doi: 10.1007/S11227-020-03524-3.

[16] S. Samidi, R. Y. Suladi, and D. Kusumaningsih, “Comparison of the RFM Model’s Actual Value and Score Value for Clustering”, Journal RESTI (Rekayasa Sist. Teknol. Inf.), vol. 7, no. 6, pp. 1430-1438, Dec. 2023, doi: 10.29207/resti.v7i6.5416

[17] G. Aslantaş, M. Gençgül, M. Rumelli, M. Özsaraç, and G. Bakırlı, “Customer segmentation using K-Means clustering algorithm and RFM model,” Dokuz Eylül Üniversitesi Mühendislik Fakültesi Fen ve Mühendislik Dergisi, vol. 25, no. 74, pp. 491–503, 2023, doi: 10.21205/deufmd.2023257418.

[18] S. Monalisa, Y. Juniarti, E. Saputra, F. Muttakin, and T. K. Ahsyar, “Customer segmentation with RFM models and demographic variable using DBSCAN algorithm,” TELKOMNIKA (Telecommunication Computing Electronics and Control), vol. 21, no. 4, pp. 742–749, Aug. 2023, doi: 10.12928/TELKOMNIKA.v21i4.22759.

[19] C.-G. Wong, G.-K. Tong, and S.-C. Haw, "Exploring Customer Segmentation in E-Commerce using RFM Analysis with Clustering Techniques", Journal of Telecommunications and the Digital Economy, vol. 12, no. 3, pp. 97-125, Sep 2024, doi: 10.18080/jtde.v12n3.978.

[20] 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, 2023, doi: 10.3390/analytics2040042

[21] D. L. Davies and D. W. Bouldin, "A Cluster Separation Measure," IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. PAMI-1, no. 2, pp. 224-227, April 1979, doi: 10.1109/TPAMI.1979.4766909.

[22] T. Caliński and J. Harabasz, "A dendrite method for cluster analysis," Communications in Statistics-Theory and Methods, vol. 3, no. 1, pp. 1-27, 1974, doi: 10.1080/03610927408827101.

Evaluating K-Means and DBSCAN for E-Commerce Customer Segmentation

Downloads

Published

2026-11-24

How to Cite

Evaluating K-Means and DBSCAN for E-Commerce Customer Segmentation. (2026). Teknika, 15(3), 609-616. https://doi.org/10.34148/teknika.v15i3.1547