Comparative Customer Segmentation Pipelines for E-Commerce Using K-Means-KNN and UMAP-K-Means-XGBoost


  • Dzidan Aditya Gumilang * Mail Universitas Sriwijaya, Palembang, Indonesia
  • Endang Lestari Ruskan Universitas Sriwijaya, Palembang, Indonesia
  • Ardina Ariani Universitas Sriwijaya, Palembang, Indonesia
  • Ken Dhita Tania Universitas Sriwijaya, Palembang, Indonesia
  • Ahmad Rifai Universitas Sriwijaya, Palembang, Indonesia
  • (*) Corresponding Author
Keywords: Comparative Analysis; Customer Segmentation; K-Means; UMAP; XGBoost

Abstract

The rapid expansion of e-commerce has generated massive volumes of customer data that remain underutilized for supporting Customer Relationship Management (CRM) strategies. Conventional customer segmentation approaches commonly employ a pipeline consisting of K-Means clustering followed by K-Nearest Neighbors (KNN) classification. However, this approach exhibits limitations in handling high-dimensional data and maintaining classification performance on large-scale datasets. This study presents a comparative analysis of two customer segmentation pipelines: the conventional K-Means-KNN pipeline and the proposed Uniform Manifold Approximation and Projection (UMAP)-K-Means-XGBoost pipeline. The experiments were conducted using the E-Commerce Shopper Behavior & Lifestyle dataset, comprising approximately one million customer records and eight selected features representing transactional, psychographic, and financial behavioral characteristics. Clustering performance was evaluated using the Silhouette Score, Davies-Bouldin Index, and Calinski-Harabasz Index, while classification performance was assessed using accuracy, precision, recall, and F1-score. Experimental results demonstrate that incorporating UMAP improves cluster separability by preserving the intrinsic structure of high dimensional data, whereas XGBoost consistently outperforms KNN in downstream classification, achieving an accuracy exceeding 99%. These findings indicate that the UMAP-K-Means-XGBoost pipeline provides a more robust, scalable, and interpretable framework for customer segmentation, thereby offering more reliable decision support for data-driven CRM strategies in e-commerce environments.

Downloads

Download data is not yet available.

References

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, vol. 21, no. 3, 2023, doi: 10.1007/s10257-023-00640-4.

J. Salminen, M. Mustak, M. Sufyan, and B. J. Jansen, “How can algorithms help in segmenting users and customers? A systematic review and research agenda for algorithmic customer segmentation,” Journal of Marketing Analytics, vol. 11, no. 4, 2023, doi: 10.1057/s41270-023-00235-5.

A. Ashraf, C. A. Rayed, N. A. Awad, and H. M. Sabry, “A Framework for Customer Segmentation to Improve Marketing Strategies Using Machine Learning,” in Procedia Computer Science, 2025. doi: 10.1016/j.procs.2025.03.240.

A. M. Ikotun, A. E. Ezugwu, L. Abualigah, B. Abuhaija, and J. Heming, “K-means clustering algorithms: A comprehensive review, variants analysis, and advances in the era of big data,” Inf. Sci. (N. Y)., vol. 622, 2023, doi: 10.1016/j.ins.2022.11.139.

R. M. Fauzan and G. Alfian, “Segmentasi Pelanggan E-Commerce Menggunakan Fitur Recency, Frequency, Monetary (RFM) dan Algoritma Klasterisasi K-Means,” JISKA (Jurnal Informatika Sunan Kalijaga), vol. 9, no. 3, 2024, doi: 10.14421/jiska.2024.9.3.170-177.

V. Sharma, P. Agarwal, H. Y. Shaikh, R. M. Lenka, S. K. Manjhi, and R. Rathore, “Smart Next-Generation Revenue Growth: A Methodology for Partitioning Customers Utilizing the K-Means Algorithm and RFM Model,” in 2024 International Conference on Smart Devices, ICSD 2024, 2024. doi: 10.1109/ICSD60021.2024.10751627.

R. Hayat Khan, D. Fabian Dofadar, M. G. R. Alam, M. Siraj, M. Rafiul Hassan, and M. Mehedi Hassan, “LRFS: Online Shoppers’ Behavior-Based Efficient Customer Segmentation Model,” IEEE Access, vol. 12, 2024, doi: 10.1109/ACCESS.2024.3420221.

E. Balasundaram, P. Aranganathan, K. S. Annavajjala, R. Sivakumar, M. Arumugam, and A. Vinoth, “A Hybrid Approach for Customer Segmentation and Loyalty Prediction in E-Commerce,” Prabandhan: Indian Journal of Management, vol. 17, no. 10, 2024, doi: 10.17010/pijom/2024/v17i10/173996.

E. Delahoz-Domínguez, A. Mendoza-Mendoza, and D. Visbal-Cadavid, “Clustering of Countries Through UMAP and K-Means: A Multidimensional Analysis of Development, Governance, and Logistics,” Logistics, vol. 9, no. 3, 2025, doi: 10.3390/logistics9030108.

J. Healy and L. McInnes, “Uniform manifold approximation and projection,” Nature Reviews Methods Primers, vol. 4, no. 1, 2024, doi: 10.1038/s43586-024-00363-x.

A. Sutou and J. Wang, “Influence-Balanced XGBoost: Improving XGBoost for Imbalanced Data Using Influence Functions,” IEEE Access, vol. 12, 2024, doi: 10.1109/ACCESS.2024.3520159.

C. Rungruang, P. Riyapan, A. Intarasit, K. Chuarkham, and J. Muangprathub, “RFM model customer segmentation based on hierarchical approach using FCA[Formula presented],” Expert Syst. Appl., vol. 237, 2024, doi: 10.1016/j.eswa.2023.121449.

P.-Y. Pai, S.-W. Lin, and W.-M. Lu, “Integration of association rule mining and RFM analysis with machine learning for e-commerce customer value segmentation: a sustainable retail perspective,” Qual. Quant., vol. 60, no. 1, pp. 87–125, Jun. 2025, doi: 10.1007/s11135-025-02259-8.

J. A. Bastos and M. I. Bernardes, “Understanding Online Purchases with Explainable Machine Learning,” Information (Switzerland), vol. 15, no. 10, 2024, doi: 10.3390/info15100587.

H. Jodlbauer, S. Tripathi, N. Bachmann, and M. Brunner, “Unlocking hidden market segments: A data-driven approach exemplified by the electric vehicle market,” Expert Syst. Appl., vol. 254, 2024, doi: 10.1016/j.eswa.2024.124331.

P. K. Syriopoulos, N. G. Kalampalikis, S. B. Kotsiantis, and M. N. Vrahatis, “kNN Classification: a review,” Ann. Math. Artif. Intell., vol. 93, no. 1, 2025, doi: 10.1007/s10472-023-09882-x.

S. Hasana and D. Fitrianah, “A Study on Enhanced Spatial Clustering Using Ensemble DBscan and UMAP to Map Fire Zone in Greater Jakarta, Indonesia,” Jurnal Riset Informatika, vol. 5, no. 3, 2023, doi: 10.34288/jri.v5i3.557.

F. E. Ozturk and N. Demirel, “Comparison of the methods to determine optimal number of cluster,” Veri Bilim Derg, vol. 6, no. 1, pp. 34–45, 2023, doi: https://izlik.org/JA52PR38GA.

M. W. Diantika, A. Rusgiyono, and B. A. Saputra, “Perbandingan Metode Optimasi Silhouette, Elbow, Dan Gap Statistics Dalam Menentukan Nilai K Terbaik Pada Analisis K-Means Clustering,” Jurnal Gaussian, vol. 14, no. 2, 2025, doi: 10.14710/j.gauss.14.2.335-344.

J. Opitz, “A Closer Look at Classification Evaluation Metrics and a Critical Reflection of Common Evaluation Practice,” Trans. Assoc. Comput. Linguist., vol. 12, 2024, doi: 10.1162/tacl_a_00675.

J. H. Cabot and E. G. Ross, “Evaluating prediction model performance,” Surgery (United States), vol. 174, no. 3, 2023, doi: 10.1016/j.surg.2023.05.023.

P. Christen, D. J. Hand, and N. Kirielle, “A Review of the F-Measure: Its History, Properties, Criticism, and Alternatives,” 2023. doi: 10.1145/3606367.

F. Barrera, M. Segura, and C. Maroto, “Multiple criteria decision support system for customer segmentation using a sorting outranking method,” Expert Syst. Appl., vol. 238, 2024, doi: 10.1016/j.eswa.2023.122310.

O. Akande, E. O. Asani, and B. Dautare, “Customer Segmentation Through RFM Analysis and K-Means Clustering: Leveraging Data-Driven Insights for Effective Marketing Strategy,” Ceddi Journal of Information System and Technology (JST), vol. 3, no. 1, 2024, doi: 10.56134/jst.v3i1.81.

S. Wang, L. Sun, and Y. Yu, “A dynamic customer segmentation approach by combining LRFMS and multivariate time series clustering,” Sci. Rep., vol. 14, no. 1, 2024, doi: 10.1038/s41598-024-68621-2.

G. Velarde et al., “Tree boosting methods for balanced and imbalanced classification and their robustness over time in risk assessment,” Intelligent Systems with Applications, vol. 22, 2024, doi: 10.1016/j.iswa.2024.200354.

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, 2024, doi: 10.18080/jtde.v12n3.978.


Bila bermanfaat silahkan share artikel ini

Berikan Komentar Anda terhadap artikel Comparative Customer Segmentation Pipelines for E-Commerce Using K-Means-KNN and UMAP-K-Means-XGBoost

Dimensions Badge
Article History
Submitted: 2026-07-21
Published: 2026-09-08
Abstract View: 15 times
PDF Download: 16 times
How to Cite
Gumilang, D., Ruskan, E., Ariani, A., Tania, K., & Rifai, A. (2026). Comparative Customer Segmentation Pipelines for E-Commerce Using K-Means-KNN and UMAP-K-Means-XGBoost. Building of Informatics, Technology and Science (BITS), 8(2), 689-698. https://doi.org/10.47065/bits.v8i2.10794
Section
Articles

Most read articles by the same author(s)