Customer Segmentation and Purchase Behavior Analysis in E-Commerce Using Clustering

Authors

  • Ikhlas Fuad Zamzami Department of Management Information Systems, College of Businss Rabigh, Jeddah, King Abdulaziz University Saudi Arabia.

Keywords:

Customer Segmentation, E-Commerce Analytics, K-Means Clustering, RFM Analysis.

Abstract

E-commerce customers have a wide range of buying habits that change often and are hard to predict. This makes it hard to track them using standard rule-based or demographic segmentation methods. Consequently, clustering methodologies offer an effective data-driven technique to reveal concealed behavioral patterns. This study employs an unsupervised learning methodology utilizing K-Means clustering on an RFM-transformed e-commerce dataset. Data preprocessing, feature scaling, Elbow analysis, and Silhouette validation were conducted to ascertain the appropriate segmentation structure. The analysis was performed on 7,903 customers obtained from transactional data. Using the Silhouette approach, we found that the best number of clusters was K=3, with a score of about 0.35. This means that the clusters were moderately but meaningfully separated. The final cluster distribution showed that 54.6% of consumers were moderate buyers, 24.5% were high-value customers, and 21.0% were dormant or at-risk clients. Centroid analysis showed big disparities in behavior, with the high-value group making a lot more money and buying things more often. PCA visualization further revealed that the clusters were clearly separated from each other. These numbers show that K-Means clustering works well for locating behavior groups in the dataset that are important for the economy. The study adds to the body of knowledge by offering a reproducible RFM-based clustering framework that combines statistical validation and visualization methods. It connects unsupervised learning with marketing strategies that can be put into action, giving useful tips on how to keep customers, personalize offers, and make the most money in a competitive e-commerce setting.

References

K. Tabianan, S. Velu, and V. Ravi, “K-means clustering approach for intelligent customer segmentation using customer purchase behavior data,” Sustainability, 2022.

R. S. Wu and P. H. Chou, “Customer segmentation of multiple category data in e-commerce using a soft-clustering approach,” Electronic Commerce Research and Applications, 2011.

J. N. Sari, L. E. Nugroho, and R. Ferdiana, “Review on customer segmentation technique on ecommerce,” Advanced Science Letters, 2016.

M. Alves Gomes and T. Meisen, “A review on customer segmentation methods for personalized customer targeting in e-commerce use cases,” Information Systems and e-Business Management, 2023.

S. Sharma, R. Satsangi, P. Manani, P. Sharma, and J. Gupta, “Strategic insights into customer diversity: Unraveling purchase patterns, income disparities, and relationship dynamics through K-means clustering for enhanced engagement and loyalty,” Procedia Computer Science, vol. 259, pp. 1–10, Jan. 2025.

A. Rosário and R. Raimundo, “Consumer marketing strategy and E-commerce in the last decade: A literature review,” Journal of Theoretical and Applied Electronic Commerce Research, vol. 16, no. 7, pp. 3003–3024, 2021.

R. K. Gupta, “Strategies for long term business survival and growth (What you do today to stay in business tomorrow),” International Journal of Research in Management, vol. 6, no. 2, pp. 495–504, 2024.

Y. U. Rofi’i, “Analysis of e-commerce purchase patterns using big data: An integrative approach to understanding consumer behavior,” International Journal of Software Engineering and Computer Science (IJSECS), vol. 3, no. 3, pp. 352–364, 2023.

B. Rolf, A. Beier, I. Jackson, M. Müller, T. Reggelin, H. Stuckenschmidt, and S. Lang, “A review on unsupervised learning algorithms and applications in supply chain management,” International Journal of Production Research, vol. 63, no. 5, pp. 1933–1983, 2025.

M. Z. Naser and A. Z. Naser, “SPINEX-clustering: Similarity-based predictions with explainable neighbors exploration for clustering problems,” Cluster Computing, vol. 28, no. 5, Art. no. 335, 2025.

G. Marin Diaz, R. Gómez Medina, and J. A. Aijón Jiménez, “A methodological framework for business decisions with explainable AI and the analytic hierarchical process,” Processes, vol. 13, no. 1, Art. no. 102, 2025.

S. Kumar, R. Rani, and S. K. Pippal, “Customer segmentation in e-commerce: K-means vs hierarchical clustering,” TELKOMNIKA (Telecommunication, Computing, Electronics and Control), 2025.

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, 2024.

R. Tatikonda, S. K. D. Veeravalli, S. R. Bittla, et al., “Customer behavior analysis for E-commerce and retail using improved K-means clustering with Calinski-Harabasz index,” in Proc. 2025 Int. Conf., 2025.

Z. Wu, L. Jin, J. Zhao, L. Jing, et al., “Research on segmenting e-commerce customer through an improved K-Medoids clustering algorithm,” Computational Intelligence and Neuroscience, 2022.

D. Kamthania, A. Pawa, and S. S. Madhavan, “Market segmentation analysis and visualization using K-mode clustering algorithm for E-commerce business,” Journal of Computing and Information Technology, 2018.

A. Langner and M. Bezdrob, “Advanced customer segmentation in e-commerce: Clustering techniques and their impact on marketing strategy optimization,” Ecoforum Journal, 2025.

K. Kumar, “E-Commerce Sales Dataset,” Kaggle, Dataset, 2025. [Online]. Available: https://www.kaggle.com/datasets/kabhargavkumar/e-commerce-sales-dataset[Accessed: Feb. 28, 2026].

Downloads

Published

30-07-2026

How to Cite

Fuad Zamzami, I. . (2026). Customer Segmentation and Purchase Behavior Analysis in E-Commerce Using Clustering . International Journal on Perceptive and Cognitive Computing, 12(2), 1–10. Retrieved from https://journals.iium.edu.my/kict/index.php/IJPCC/article/view/697

Issue

Section

Articles