Application of K-means Clustering Algorithm in Consumer Shopping Behavior Segmentation in E-commerce

Authors

  • Andrean Japardi STMIK TIME
  • Edi STMIK Time
  • Feriani Astuti Tarigan STMIK Time

DOI:

https://doi.org/10.59934/jaiea.v5i1.1659

Keywords:

consumer, segmentation, k-means, clustering, behavior

Abstract

Companies are forced by fierce rivalry to be the best at satisfying customer requirements in order to keep clients from moving to rivals. Therefore, an algorithm—such as the K-means Clustering algorithm—is required to segment customer buying behavior so that businesses may more accurately satisfy demands. Using a simulated dataset from Kaggle that contains nine variables with information on consumer purchasing behavior, this study attempts to apply K-means Clustering to segment customer shopping behavior in e-commerce and assess its efficacy. Pre-processing, normalization, and the selection of three important numerical features—AvgTotalSpend, AvgSpendPerTrans, and LoyaltyScore—are all part of the analytic process. The elbow technique and silhouette score are used to determine the ideal number of clusters. The density between clusters is also evaluated using the Dunn index. Three separate consumer clusters are identified by the segmentation results: Cluster 0 has very low values for AvgTotalSpend, AvgSpendPerTrans, and LoyaltyScore; Cluster 1 has reasonably high values for all three attributes; and Cluster 2 has low LoyaltyScore but high AvgTotalSpend and AvgSpendPerTrans. According to these results, customers in Cluster 1 are more likely to make repeat purchases in the future, which offers insightful information for focused marketing campaigns.

Downloads

Download data is not yet available.

References

H. A. "Penerapan Data Mining Menggunakan Metode K-Means Clustering Untuk Pengelompokkan Data Pelanggan (Studi Kasus : PT Pinus Merah Abadi)," Jurnal Web Informatika Teknologi (J-WIT), vol. 6, no. 1, pp. 1-8, 30 June 2021.

K. T. S. V. and V. R. , "K-Means Clustering Approach for Intelligent Customer Segmentation Using Customer Purchase Behavior Data," Sustainability, vol. 14, no. 12, 13 June 2022.

I. P. V. S. Hadi Sukmawati and Y. W. , "Implementasi Algoritma K-Means Pada Klasterisasi Tingkat Kasus Stunting Di Kabupaten Batang," Jurnal Infortech, vol. 6, no. 2, pp. 101-106, 6 December 2024.

B. T. Kristanti, A. J. and E. P. Mandyartha, "Implementasi K-Means Clustering Dalam Segmentasi Pelanggan Berdasarkan Usia, Pendapatan Dan Model RFM (Studi Kasus: Lantikya Store Jombang)," JITET (Jurnal Informatika dan Teknik Elektro Terapan), vol. 12, no. 3, 7 August 2024.

A. F. Zabidi, "Penerapan Algoritma K-Means untuk Pengelompokan Koleksi Perpustakaan dengan Data Mining," Media Jurnal Informatika, vol. 16, no. 2, p. 233–242, December 2024.

G. R. and Y. A. , "Perbandingan Kinerja Algoritma K-Means dan Agglomerative Clustering untuk Segmentasi Penjualan Online pada Customer Retail," Jurnal Informatika: Jurnal Pengembangan IT (JPIT), vol. 9, no. 1, p. 92–96, January 2024.

D. F. Ningtyas and N. S. , "Implementasi Flask Framework Pada Pembangunan Aplikasi Purchasing Approval Request," Jurnal Janitra Informatika dan Sistem Informasi, vol. 1, no. 1, p. 19–34, 16 April 2021.

R. I. N. and A. , "Optimization of K-Means in Disease Clustering of Pregnant Women Using Random Forest," Journal of Electrical and Electronics Engineering, vol. 7, no. 1, January 2022.

R. A. Sary, N. S. and W. A. , "Application of K-Means++ with Dunn Index Validation of Grouping West Kalimantan Region Based on Crime Vulnerability," Jurnal Ilmu Matematika dan Terapan, vol. 18, no. 4, p. 2283–2292, 14 October 2024.

Downloads

Published

2025-10-15

How to Cite

Japardi, A., Edi, & Tarigan, F. A. (2025). Application of K-means Clustering Algorithm in Consumer Shopping Behavior Segmentation in E-commerce. Journal of Artificial Intelligence and Engineering Applications (JAIEA), 5(1), 1505–1508. https://doi.org/10.59934/jaiea.v5i1.1659