Data-Driven Customer Segmentation Using the RFM Model and K-Means Clustering: A Longitudinal Analytical Study of Online Retail Behavior Using Python and Orange3
Data-Driven Customer Segmentation Using the RFM Model and K-Means Clustering: A Longitudinal Analytical Study of Online Retail Behavior Using Python and Orange3
Ben Amara Salim,Chouireb Messaoud
2026 · DOI: 10.56334/sei/9.5.17
Science, Education and Innovations in the Context of Modern Problems · 0 Citations
TLDR
This study provides a comprehensive quantitative analysis of customer behavior using the Recency–Frequency–Monetary (RFM) model combined with K-Means clustering techniques, applied to longitudinal transactional data from an international online retail platform during the period 2010–2011.
Abstract
In the contemporary digital economy, the ability to effectively analyze and segment consumer behavior has become a
critical determinant of organizational competitiveness and strategic decision-making. This study provides acomprehensive quantitative analysis of customer behavior using the Recency–Frequency–Monetary (RFM) modelcombined with K-Means clustering techniques, applied to longitudinal transactional data from an international onlineretail platform during the period 2010–2011. Adopting a data-driven analytical framework, the research integratesstatistical modeling and machine learning techniques within a Python-based computational environment, supported bythe Orange3 data mining platform. The study constructs behavioral profiles based on three core dimensions—recency ofpurchase, purchase frequency, and monetary value—allowing for the identification of distinct customer segments. Theclustering process is validated using the Silhouette coefficient and further supported by inferential statistical testing throughone-way analysis of variance (ANOVA), ensuring the robustness and internal consistency of the segmentation model.The findings reveal the existence of three statistically significant customer segments: high-value (champion) customers,inactive or lost customers, and regular or potentially valuable customers. Each segment exhibits distinct behavioral andeconomic characteristics, enabling the formulation of targeted marketing strategies aimed at maximizing customer lifetimevalue and optimizing resource allocation. The study contributes to the existing literature by demonstrating theeffectiveness of integrating traditional marketing analytics models with contemporary machine learning techniques, whilealso providing practical implications for e-commerce firms seeking to enhance customer relationship managementthrough data-driven segmentation approaches.