Application of K-means Clustering Algorithm with RFM for Customer Segmentation in Logistics Sector

  • Sergey Vichev
Keywords: K-means clustering, customer segmentation, logistics sector, unsupervised machine learning, R, RStudio, RFM Analysis


: In today's business landscape, understanding customer behavior is crucial for organizations to optimize their operations, improve profitability and increase retention. Customer segmentation, as a marketing analytical tool, plays an essential role in identifying distinct groups of customers based on their purchasing patterns. This work proposes the application of K-means clustering algorithm for customer segmentation in the logistics sector using an anonymous dataset from a real logistics company with a 10-year history and 1043 customer records. The study aims to enhance decision-making processes by delineating customer segments based on transactional behavior metrics such as total revenue, recency, and frequency of orders (RFM analysis). By employing this unsupervised machine learning technique, are identified distinct clusters that allow producing tailored business strategies and managerial decisions. The strategic significance of each customer segment is highlighted by their unique characteristics. This work underscores the power of K-means clustering in extracting meaningful patterns from complex datasets, providing a valuable tool for logistics enterprises to gain competitive advantage through nuanced customer insights.


1. Agarwal, P., 2003. "Clustering & classification" in Algorithms in Computational Biology", Duke University, North Carolina.
2. Aliyev, M., Ahmadov, E., Gadirli, H., Mammadova, A., & Alasgarov, E., 2020. Segmenting Bank Customers via RFM Model and Unsupervised Machine Learning. arXiv:2008.08662.
3. Alpaydin, Е. 2004. Introduction to Machine Learning, The MIT Press, London, 2004; ISBN: 0-262- 01211.
4. Chen, A., Liang, Y.-C., Chang, W.-J., & Siauw, H.-Y., 2022. RFM Model and K-Means Clustering Analysis of Transit Traveller Profiles: A Case Study. Journal of Advanced Transportation, 3, 1108105. DOI: 10.1155/2022/1108105. License: CC BY 4.0.
5. Doğan, O., Ayçin, E., & Bulut, Z. (2018). Customer segmentation using RFM model and clustering methods: A case study in retail industry. International Journal of Contemporary Economics and Administrative Sciences, 8(1), 1-19. ISSN: 1925–4423.
6. Kassambara. A., , 2017. Practical Guide to Cluster Analysis in R: Unsupervised Machine Learning (Multivariate Analysis) (Volume 1), STHDA.
7. Sugiyama M. 2016. Introduction to Statistical Machine Learning, Morgan Kaufmann, ISBN: 978-0-12-802121-7.
How to Cite
Vichev, S. (2023). Application of K-means Clustering Algorithm with RFM for Customer Segmentation in Logistics Sector. Vanguard Scientific Instruments in Management, 19, 199 - 211. Retrieved from[]=517