Abstract
Customer segmentation is a critical step in the efficient utilization of customer data and maximization of profitability in the e-commerce sector. Segmentation studies can yield economic benefits for firms and provide a range of insights based on customer data. This study proposes an extended RFM framework to address the shortcomings of the traditional RFM model, using customer transaction data from an e-commerce company for the period 1 January 2024–31 December 2025. The proposed framework integrates additional dimensions—campaign share, basket depth, and the standard deviation of inter-order intervals—alongside the conventional recency, frequency, and monetary values to improve segmentation. Subsequently, several clustering techniques employed for segmentation, including K-means, K-medoids, and fuzzy C-means, were considered. To determine the optimal number of clusters and assess the model fit, the results of the algorithms were evaluated using a quality index computed with multiple indices, such as the Silhouette, Dunn, and Davies–Bouldin indices. The proposed extended RFM model extends the traditional RFM framework by integrating additional behavioral dimensions such as price sensitivity, shopping regularity, and basket depth. This enriched representation of customer behavior allows for more discriminative and actionable segmentation, thereby enhancing target customer identification and enabling more precise product recommendation strategies.
1. Introduction
Customer segmentation, as a component of marketing strategy, involves dividing a large customer base into smaller groups that share common needs and characteristics. This approach enables firms to design marketing campaigns and deliver more individualized experiences. In the e-commerce domain, the importance of customer segmentation has grown with the rise in online shopping. Segmentation can enhance marketing effectiveness and customer satisfaction by providing a deeper understanding of the target market [1]. In addition, the RFM analysis method plays a central role in consumer segmentation. Recency, frequency, and monetary value form the basis of RFM analysis, a technique widely used in customer relationship management and marketing. Based on past purchases, purchase frequency, and expenditure, the method partitions customers into segments [2]. When applied to target customer segments with tailored marketing strategies, RFM analysis offers valuable insights into consumer behaviors. The premise of RFM analysis is that recent purchases, high purchase frequency, and substantial spending indicate customer loyalty and the probability of future transactions. By examining these three behavioral characteristics, organizations can better assess the worth of their customers and direct their marketing efforts accordingly [3]. RFM analysis has been extensively employed to drive sales growth and enhance customer loyalty and retention across diverse industries, including retail, financial services, and healthcare [2,3,4]. Integrating RFM analysis into customer relationship management strategies can improve customer engagement, deepen the understanding of customers and elevate overall satisfaction. In summary, this study seeks to inform future decision-making by grouping customers based on multiple attributes and purchase patterns.
This study used a real-world e-commerce dataset for segmentation. Initially, an extended RFM analysis was performed, and in addition to the traditional recency, frequency, and monetary metrics, three supplementary columns were introduced to yield more precise results. The additional dimensions are depth, campaign percentage, and the standard deviation of the inter-order intervals. Clustering algorithms are then applied, and a new index is constructed as the average of the computed indices. Finally, the optimal number of clusters is determined, and the associated recommendations and discussions are presented.
In recent studies on customer segmentation in the retail and e-commerce industries, RFM analysis and clustering algorithms are widely used [5]. Several studies have extended the traditional RFM framework by incorporating additional features [6]. In this study, unlike the studies in the literature, additional dimensions reflecting price sensitivity, basket depth, and shopping regularity were added to the RFM analysis, simultaneously. Furthermore, instead of a single-dimensional evaluation, a multi-dimensional index was proposed to compare the performance of different clustering models, select the best number of clusters and measure clustering quality. Thus, a more comprehensive and actionable approach to customer segmentation was developed.
The remainder of this paper is organized as follows: Section 2 provides a detailed review of the literature on RFM analysis and customer segmentation. Section 3 outlines the methodologies of the clustering algorithms and indices employed in this study. Section 4 describes the application steps. Section 5 presents the findings and results. Finally, Section 6 concludes this paper.
2. Literature Review
A growing body of literature has examined customer segmentation using analytical approaches, particularly clustering algorithms and RFM-based models [5]. These studies can be summarized as follows.
In 2001, Fingerhut BI and IBM collaborated to enhance the accuracy of segmentation-based models, indicating substantial improvements over traditional RFM analysis [7]. Dash et al. [8] introduced the BRIDGE algorithm, which fuses distance-based K-means with density-based DBSCAN and enhances the performance of both methods while mitigating their limitations. Hwang et al. [9] proposed a lifetime value (LTV) model that incorporates three variables: historical profit contribution, potential benefit, and a customer’s defection probability. Subsequently, a framework for customer segmentation was proposed in this study. In 2005, to predict the partial detection of loyal customers, classification techniques were employed, and RFM variables were identified as the most significant predictors of churn behavior [10]. To identify similar customer behaviors and reduce the data size for classification, Chicco et al. [11] compared various clustering algorithms and techniques. To address the challenges of data mining tools, RFM variables and the K-means algorithm were combined, and Rough Set (RS) Theory was introduced [12]. Wu and Chou [13] proposed a soft clustering method based on a latent mixed-class approach for customer segmentation. Chen et al. [14] implemented the RFM model and employed K-means clustering and Decision Tree Induction for segmentation. Syakur et al. [15] applied the K-means algorithm and the Elbow method to determine the optimal number of clusters for datasets of varying sizes. Christy et al. [16] utilized RFM analysis alongside clustering algorithms such as K-means and fuzzy C-means and proposed a method for initializing the K-means centroids. Anitha and Patil [17] applied RFM analysis with K-means for customer segmentation and used the silhouette score for performance assessment. Li et al. [18] conducted RFM analysis using the Analytic Hierarchy Process with entropy-weighting and employed K-means clustering. Díaz et al. [19] presented an interpretable framework using fuzzy C-means-based RFM analysis and an XGBoost classifier to solve the customer segmentation and churn risk detection problem. Grigorova et al. [20] used k-means and hierarchical clustering for RFM-based customer segmentation in financial services and presented an automated segmentation framework that integrates clustering results with interpretability criteria. Tang [21] addressed the problem of sales forecasting and customer segmentation in the retail sector in an integrated manner. In this study, RFM analysis was performed using the K-means algorithm for customer segmentation, and three regression models—MLP, Ridge, and KNN regressors—were used for sales forecasting. Ufeli et al. [22] presented a novel application of a Factor Analysis of Mixed Data (FAMD) for dimensionality reduction, integrated with K-means and Agglomerative clustering for robust customer segmentation in datasets containing both numerical and categorical variables.
Beyond traditional RFM analysis, the literature contains numerous studies on extended RFM models. Wu and Lin [23] proposed two extensions of traditional RFM variables—the monetary matrix and the fluctuation rate matrix—and applied clustering methods to derive segmentation from these matrices. Yeh et al. [24] proposed an extended RFM model by incorporating time since the first interaction and churn probability via a Bernoulli process. In the same year, a predictive churn model that accounts for emotions expressed in emails, in addition to an extended RFM model, was proposed using various classification techniques [25]. Hosseini et al. [26] proposed an extended RFM model by adding a parameter for classifying customer product loyalty, with the findings indicating superior performance relative to more commonly used models. Khajvand et al. [27] compared traditional RFM analysis with extended RFM analysis in which a “Count Item” variable was added, and no significant difference was observed; they also developed an adapted weighted RFM analysis for estimating customer lifetime value. Chang and Tsai [28] proposed an extended RFM model called Group RFM, which considers purchase characteristics. Birant [29] argued that, in addition to RFM variables, a customer’s potential future behavior and items frequently purchased are significant for segmentation. Hu and Yeh [30] proposed the RFMP-growth algorithm, which aids in discovering RFM patterns to support inferences without complete customer information. Zhang et al. [31] proposed an extended RFM model named RFMC by adding the “Clumpiness” variable, increasing predictive power over the traditional RFM model. Peker and Eren [32] added “length” and “periodicity” to the traditional RFM model, introducing the LRFMP model. Heldt et al. [33] proposed the RFM-per-product model (RFM/P) to gain insights into customer value on a per-product basis. Wan et al. [34] used RFM indicators as three thresholds to derive super-itemsets exceeding a user-defined minimum. Tasabat et al. [35] proposed RFMS analysis, which incorporates a “Sensitivity” factor into the traditional RFM framework to reflect economic variables. Rungruang et al. [36] developed a novel clustering algorithm by integrating RFM analysis with formal concept analysis (FCA). Kumar [37] conducted RFM analysis using Bisecting K-Means, partitioning customers into four categories. In this study, clustering quality was evaluated using the Silhouette score and Davies–Bouldin index. Jalal and Elmaghraby [38] applied the K-means algorithm with various distance measures along with classification algorithms for customer segmentation and an analysis of customer transitions between segments, using time-series feature vectors encompassing recency, frequency, monetary, and lifespan.
In this study, unlike previous studies, new dimensions such as campaign rate, depth, and the standard deviation of time between purchases were added simultaneously to the traditional RFM analysis to improve customer segmentation. Thus, in customer segmentation, customer behavioral characteristics such as price sensitivity, shopping regularity, and product variety are considered, along with customer value, shopping frequency, and loyalty. Furthermore, this study uses an index that simultaneously considers three different indices commonly used in the literature to measure clustering quality.
The classification of previous work related to customer segmentation in the literature is presented in Table 1.
Table 1.
Overview of prior studies on customer segmentation.
3. Methodology
A broad range of clustering algorithms and indices exists in the literature for customer segmentation, as noted in the preceding section. This study employs k-means, k-medoids, and fuzzy c-means for clustering and evaluates performance with the Silhouette, Dunn, and Davies–Bouldin indices. Other clustering algorithms, such as Self-Organizing Map (SOM) and DBSCAN, were not used. The DBSCAN algorithm is not preferred because of its high sensitivity to parameter values such as epsilon and minimum points and its lack of success with high-dimensional and variable-density data. Although the SOM model is successful in visualization, it is not used because of difficulties in interpretation and the ambiguity of the cluster. The clustering algorithms used were selected based on criteria such as suitability for the dataset and interpretability.
The following subsections detail the clustering models and indices used.
3.1. K-Means
The k-means clustering algorithm is a standard approach for partitioning a dataset into a predetermined number of clusters [39]. The algorithm iteratively assigns each data point to the cluster whose mean is the nearest and subsequently updates the cluster means to reflect the means of the assigned points [40]. The process terminates when the cluster assignments no longer change.
K-means is particularly advantageous when the number of clusters is known a priori or can be anticipated [39]. It has been applied across various domains, including market segmentation and image compression [41]. However, this method is sensitive to initial cluster assignments and can converge to suboptimal solutions [39].
Stuart P. Lloyd of Bell Labs initially proposed the k-means algorithm as a technique for pulse-code modulation in 1957; although his work circulated widely, it was formally published only in 1982 [42]. The algorithm is also referred to as the Lloyd–Max algorithm because Joel Max independently developed and published a similar method in 1960 [43,44]. This approach originated with Lloyd for vector quantization, but MacQueen adapted it for clustering in 1967 [40]. Since then, in the realms of pattern recognition and data mining, K-means has emerged as one of the most popular and well-known clustering algorithms [39].
The k-means method is notable for its simplicity, low computational burden, and robust performance. It has been widely applied across diverse fields and is particularly advantageous for clustering large datasets [39,42]. An additional benefit of the k-means algorithm is its interpretability. This yields a clear and comprehensible partitioning of the data, which can be advantageous for applications such as data visualization [45]. Moreover, by employing a variant known as k-modes, the method can be extended to handle categorical data [46]. Nevertheless, the k-means algorithm possesses important drawbacks. A principal limitation is the assumption that clusters are spherical and of equal size, which may not hold for real-world datasets [39]. It is also highly sensitive to outliers, which can substantially affect the cluster means and lead to undesirable results [47]. In conclusion, the k-means algorithm is a popular and effective approach for partitioning a dataset into a fixed number of clusters. Its use should be exercised with caution in practical applications because of its inherent assumptions and limitations.
The steps of the k-means algorithm are as follows [48]:
- Initialization: k initial centroids are selected from the data points, typically randomly.
- Assignment: Each data point is allocated to the cluster with the nearest centroid. The Euclidean distance metric can be used to quantify the separation between a point and centroid.
- Update: Each cluster centroid is recomputed as the mean of all points allocated to that cluster.
- Iteration: Steps 2 and 3 are repeated until a predefined number of iterations is reached or the cluster assignments no longer change.
- Termination: The algorithm terminates when the centroids converge or the maximum number of iterations is reached.
Within the k-means clustering method, the objective is to minimize the loss function by selecting each centroid for where denotes the number of clusters [38].
The objective function of the k-means model can be defined by Equation (1). In this equation, denotes the loss function, indicates the total number of data points, is the th data point, and indicates whether belongs to cluster k.
To minimize this loss function , first we would like to select using Equation (2):
This also means that we want to assign each to the closest . Following this assignment, we would like to minimize this loss function simply by reselecting our centroids. This allows us to solve our objective function for , which leads to our objective function for finding centroids, as in Equation (3).
After repeating these steps a certain number of times, k-means converges to a local optimum.
3.2. K-Medoids
As an alternative to the well-established k-means method, Kaufman and Rousseeuw introduced the k-medoids algorithm, commonly known as partitioning around the medoids (PAM). Unlike k-means, which represents clusters by their means or centroids, the k-medoids approach uses actual data points as the medoids (centers) of the clusters.
The k-medoids algorithm is a variant of k-means that centers each cluster on the most central data point, that is, the medoid, rather than the mean. The procedure iteratively updates the medoids and reassigns the observations to clusters until convergence.
Compared with k-means, the k-medoids method offers several advantages. A principal benefit is greater robustness to outliers because a medoid is less influenced by extreme values. Moreover, whereas k-means is limited to numerical data, k-medoids can handle categorical data. The partitioning around medoids (PAM) variant is widely used to determine the number of clusters in a dataset and identify the medoid within each cluster [49].
To address more complex and high-dimensional datasets, several modifications and variants of the k-medoids method have been developed, including weighted k-medoids and fuzzy k-medoids.
In terms of the loss function, the k-medoids algorithm closely resembles k-means, with a notable difference: a variety of dissimilarity functions can be employed beyond the Euclidean distance [49]. Denote as our dissimilarity function (Euclidean distance, L1 norm, Canberra distance, etc.), and let k be the number of clusters, n the total number of data points, the th data point, and the centroid for , and let and indicate whether belongs to cluster . The objective function of K-medoids can be defined using Equation (4).
This implies that can be represented as in Equation (5).
After assigning each data point to the least dissimilar cluster, new medoids should be chosen to minimize the loss function J. The procedure proceeds until J converges to a local optimum. As with k-means, different initializations of medoids may yield different local optima.
3.3. Fuzzy C-Means
Bezdek introduced the clustering method known as fuzzy C-means (FCM) in 1973 as an improvement over the conventional C-means algorithm. FCM permits degrees of ambiguity or “fuzziness” in cluster membership, unlike traditional C-means, which assigns each data point to a single cluster [50].
The FCM framework is based on a membership degree that quantifies the extent to which a data point belongs to a cluster. The cluster centers are updated using a set of non-negative fuzzy partition coefficients that reflect these membership degrees. The objective function of the fuzzy c-means method measures the similarity between data points and cluster centroids and is minimized via an iterative optimization procedure until convergence.
FCM has been applied across diverse fields, including image processing, bioinformatics, and medical diagnostics, and is particularly advantageous for handling high-dimensional and non-elliptical datasets where clusters may overlap.
Researchers have extended and modified the FCM framework, such as through the Possibilistic C-Means (PCM) algorithm, which accounts for overlapping clusters [51].
In contrast to K-means and K-medoids, in the FCM algorithm, the partition coefficient is not discrete but continuous; therefore, our partition coefficient takes for data points, , for clusters, and as the th data point [50]. With the fuzziness parameter , the loss function can be defined as in Equation (6). In the fuzzy C-means algorithm, the fuzziness parameter (m) has critical importance in controlling the degree of membership sharing between clusters. Lower values of m produce more distinct clusters, while higher values overlap and may reduce interpretability. In this study, the value of m is taken as 2, which is one of the most widely used values in the literature.
where the partition coefficient is calculated with Equation (7).
After the calculation of partition coefficients, the calculation of new centroids is conducted using Equation (8):
The model is repeated until convergence to a local optimum is achieved.
3.4. Clustering Validation Indices
This subsection details the metrics used to evaluate clustering quality, not the clustering models. While clustering models are employed to generate customer segments, clustering validation indices are used to measure the performance of these models. A variety of indices are available in the literature for comparing clustering outcomes. As noted at the outset of this section, this study employs the Silhouette, Dunn, and Davis–Bouldin indices.
The silhouette index is among the most widely used measures. It assesses clustering quality and was introduced by Peter and Rousseeuw [47]. Specifically, the silhouette index evaluates how similar an object is to its own cluster relative to other clusters. A high silhouette value signifies well-formed clustering, with the object fitting its assigned cluster well and fitting poorly to other clusters. The silhouette index ranges from −1 to 1, where −1 indicates that the object would be better assigned to a different cluster, and 1 indicates perfect alignment with its own cluster. Each data point can have its silhouette index computed, and the mean silhouette score provides an overall measure of clustering effectiveness. Because it is independent of the number of clusters, the silhouette index can be used to identify the optimal number of clusters and to compare different clustering algorithms for a given dataset.
The silhouette index has been extensively applied in areas such as image segmentation, pattern recognition, and gene expression analysis. It serves as a reliable indicator of clustering quality since it is robust to changes in cluster density and data scaling.
After using any clustering method, the calculation of the silhouette index uses the following formulas for each data point where , is the selected number of clusters, represents the th participant of cluster , represents the total participants of cluster and is the distance function [47].
In Equation (9), represents how well participated in . Then, the calculation of follows using Equation (10).
After the calculation of separation, the silhouette index for is calculated with Equation (11):
where takes a value between −1 and 1. The average silhouette values of each data point show us how well the clustering method worked.
The Dunn indexis defined as the ratio of the minimum inter-cluster distance to the maximum intra-cluster distance, serving as a quality measure of clustering. Consequently, larger Dunn index values indicate more distinct and compact clusters. The Dunn index is useful for determining an appropriate number of clusters, as it is independent of k, and it enables the comparison of different clustering algorithms for a given dataset. It has been widely utilized in diverse clustering applications, including image segmentation, pattern recognition, and gene expression analysis. Nevertheless, a Dunn index value can be low even when clusters are clearly separated, due to the presence of noise and outliers in the data.
Two extensions have been proposed to address the limitations of the original Dunn index, the Generalized Dunn index (GDunn) [52] and the Modified Dunn index (MDunn) [53], which permit the use of non-Euclidean distance metrics. Dunn’s formulation for the index of a clustered set is given by Equation (12).
where is the total number of clusters, is the cluster, is the size of cluster (intra-cluster distance) and is the inter-cluster distance between clusters and [54]. While there exist different methods for calculating both intra-cluster distance and inter-cluster distance, Dunn proposes one for the intra-cluster distance as in Equation (13).
and there is flexibility in using different distance calculating techniques, such as the Euclidean and Manhattan techniques, to determine distances for . Different inter-cluster distance calculation methods also exist, and one example is Centroid Linkage Distance, where represents a centroid for . Centroid Linkage Distance can be calculated using Equation (14).
The Davis–Bouldin index is a widely used metric for assessing the quality of clustering algorithms [55]. It rests on the premise that effective clustering yields clusters that are both compact and well separated. Lower values of the index indicate higher clustering quality. The index estimates the ratio of the average distance between the centroids of each cluster to the distance between the centroids of the two closest clusters. This index can be calculated with Equation (15):
where K is the number of clusters, Ri denotes the average distance between each point in cluster I and centroid , and denotes the separation between clusters I and j’s centroids. The definition of is denoted by Equation (16):
where is the distance between point k and centroid , and is the total number of points in cluster i. Using the average distance between each cluster and its most different cluster as a starting point, the DBI calculates the average similarity between each cluster and its most similar cluster. DBI values closer to zero indicate more distinct and well-separated clusters, while lower values indicate better clustering outcomes [55].
Applications of the Davis–Bouldin index span domains such as image segmentation, bioinformatics, and natural language processing, among others. For instance, Li and Liu [56,57] employed the DBI to compare different clustering methods on a sample of Chinese microblogs and found it useful for selecting the most appropriate algorithm for that task. In another study, Bandyopadhyay and Maulik [58] used the index to compare several clustering techniques on a dataset of satellite imagery and concluded that the DBI aided in determining an appropriate number of clusters for that application. Overall, the Davis–Bouldin index constitutes a valuable tool for evaluating the effectiveness of clustering algorithms across diverse applications.
4. Application
As noted previously, this study presents an extended RFM analysis based on real-world data from an e-commerce company. In addition to the conventional RFM variables, the analysis incorporates depth, campaign percentage, and the standard deviation of intervals to derive insights into the dataset. In the subsequent stage, three clustering algorithms are applied, and the optimal number of clusters and the most suitable clustering algorithm are selected by comparing quality indices.
4.1. Dataset
Prior to performing the RFM analysis, rows containing missing values were removed as a preprocessing step. Additionally, outliers were detected and eliminated using the Modified Z-score method. A value of 3 was used as the Z-score threshold. The definitions of the attributes in the proposed RFM framework are presented in Table 2:
Table 2.
An overview of the attributes in the proposed RFM framework.
The depth attribute indicates the breadth of products purchased by a customer. The recency, frequency, and interval of standard deviation attributes provide insights into churn probability and customer loyalty. The monetary attribute reflects the amount spent and thus the value contributed to the company. Purchases are valued at current prices to mitigate inflation effects. The campaign percentage attribute helps identify customers who are sensitive to campaigns.
Table 3 provides the sample dataset resulting from the calculations of the extended RFM analysis, shown in a scaled form.
Table 3.
Scaled sample dataset for customer segmentation.
The dataset used for the clustering analyses comprises six columns and 675,432 rows. It covers the period from 1 January 2024 to 1 December 2025. This dataset is supplied by an e-commerce retail business and contains real-world data. Descriptive statistics of the attributes in the dataset are presented in Table 4.
Table 4.
Descriptive statistics of the attributes.
Figure 1 presents a correlation matrix of the dataset. As can be inferred from the table, monetary and frequency exhibit the strongest correlation, which is expected since expenditure tends to increase with the number of purchases. Additionally, monetary and frequency show relatively stronger correlations with depth than with the other attributes.
Figure 1.
Correlation matrix of numeric attributes.
4.2. Customer Segmentation Using Proposed Models
To obtain the extended RFM data, T-SQL was employed, while Python 3.10 was used to construct the clustering models. Various Python libraries were utilized for modeling and visualization. For clustering, libraries such as Scikit-learn (KMeans), k-medoids, and skfuzzy were imported. The number of clusters for each clustering model was tested between 6 and 15.
As noted earlier, the clustering models implemented include K-means, K-medoids, and fuzzy C-means. To ensure accurate comparisons, the Euclidean distance metric was used to compute distances for all algorithms.
Following the implementation of the clustering algorithms, the Silhouette index, Modified Dunn index, and Davis–Bouldin index (DBI) were computed for each algorithm. The number of clusters to be chosen corresponds to the peak of the indices for all metrics, except for the Davis–Bouldin index; accordingly, the reciprocal values were used for the results obtained with the Davis–Bouldin index. The Davis–Bouldin column in Table 5 shows the 1/DBI values. Table 5 presents the clustering index values for different numbers of clusters for the proposed clustering algorithms.
Table 5.
Performance analysis of proposed clustering models.
Subsequently, the index results were normalized, and the averages were calculated for each algorithm and cluster count. The resulting average, used for comparison, is referred to as the quality index. Figure 2 displays the quality indices for the three algorithms, and the highest peak determines the preferred choice:
Figure 2.
Quality indices of proposed clustering models.
5. Findings
The proposed clustering methods were applied to the scaled dataset. To ensure fair comparisons among clustering methods, only the Euclidean distance-based variants were considered. After applying the specified performance measures, a final comparison among methods was conducted using a scaled performance plot that integrates the Silhouette index, Modified Dunn index, and Davis–Bouldin index. For this dataset and the selected features beyond the RFM variables, K-means outperformed the other two methods on the average of the scaled performance measures shown in Figure 2, with K-medoids as the secondary contender.
A cluster count of k = 9 was chosen because it is sufficiently large to represent distinct customer groups and offers slightly better performance than neighboring cluster counts according to the current performance metrics.
To support the interpretation of customer segments, the scaled values of cluster centers were discretized into five categories: very low, low, medium, high, and very high. Figure 3 presents a radar diagram of the cluster centers. Thus, the characteristics of each cluster can be visually determined. Additionally, Table 6 gives the cluster centers obtained using the best clustering model.
Figure 3.
Radar chart visualization of customer clusters based on behavioral metrics.
Table 6.
The scaled cluster centers obtained with the best model.
To facilitate the interpretation of customer segments, the data table of scaled cluster centers is discretized by assigning each attribute to one of five categories: very low, low, medium, high, and very high. Table 7 presents the cluster centers expressed through linguistic variables.
Table 7.
The scaled cluster centers obtained using the best model and linguistic variables.
According to Table 7, the analysis of each customer segment is as follows:
Cluster 1—Low-value, promotion-insensitive, irregular loyal customers: This cluster consists of new customers, characterized by both monetary value and recency, with irregular purchasing patterns as indicated by the standard deviation (STD). These customers can be converted into regular customers through notifications or product recommendations.
Cluster 2—Low-value, promotion-insensitive lost customers: The members of this cluster exhibit very low monetary value, indicating limited purchasing activity, but their depth indicates that purchases span several items rather than a single item. If paired with very high recency, these customers have used the company’s e-commerce application but are near churn.
Cluster 3—Promotion-sensitive loyal customers: With most attributes at medium levels except for campaign percentage and irregular purchasing intervals, which are very high, these customers can be regarded as the most price-sensitive.
Cluster 4—Low-value, regular lost customers: As can be seen in Table 6, this segment has the highest recency value and the lowest standard deviation between transactions among all clusters. This cluster consists of previously regular and churned customers.
Cluster 5—Moderate-value, average-behavior segment: This segment consists of customers with average behavioral characteristics who purchase a limited number of product types.
Cluster 6—High-value, at-risk, promotion-insensitive customers with high basket depth: Emphasizing very high depth, high frequency, and low STD values, this group can be considered at-risk customers. The low campaign percentage supports the observation that their purchases are independent of campaigns, an attribute associated with regular customers.
Cluster 7—High-value loyal customers with high basket depth: This segment consists of loyal customers who have above-average frequency and monetary and basket depth values.
Cluster 8—Churned customers with high price and promotion sensitivity: This segment tends to purchase only when specific items are on promotion, as indicated by the very high campaign percentage coupled with low depth and medium monetary value. These customers can be characterized as opportunists.
Cluster 9—Champions: Exhibiting the highest monetary and depth values together with very high frequency and low recency, this cluster comprises the regular and most loyal and most valuable customers of the e-commerce company.
6. Conclusions
In this study, a new extended RFM approach is proposed by adding variables such as depth, campaign percentage and interval standard deviation to the traditional RFM analysis for customer segmentation in e-commerce. The effectiveness of the proposed approach is presented with real-life data from an online grocery retailer using clustering algorithms such as k-means, k-medoids and fuzzy c-means. In the proposed approach, the best number of clusters and clustering model are determined by a clustering quality index calculated based on the Silhouette, Dunn and Davies–Bouldin indices.
The variables added to the RFM model enable the segmentation of customers into categories such as regular/irregular, price sensitive/price insensitive, and high/low basket depth. Thus, customers are segmented according to frequency, recency, and monetary dimensions, as well as price sensitivity, depth, and shopping regularity. Customer retention strategies, product recommendations and campaign target audiences can be determined using these segments. For example, customers in Cluster 8 can be offered campaigns with price discounts to increase their basket depth, thus preventing churn among these customers. By using association rule mining algorithms to analyze the purchasing behavior of at-risk customers in Cluster 6, customized product recommendations can be offered to these customers.
Several additional improvements can be made to yield better results in future studies. Extending the dataset over a longer time horizon could yield more distinctive customer segments by incorporating seasonal purchasing patterns. Moreover, exploring distance metrics beyond Euclidean distance could enhance clustering performance. At this point, Manhattan distance can be used for the high-dimensional sparse data frequently encountered in e-commerce. Finally, alternative clustering algorithms including density-based and deep learning-based methods and different feature sets such as clickstream data and customer interaction data could be employed. Furthermore, future studies could focus on developing integrated approaches for segmentation, churn, and product recommendation. Longitudinal analyses can be performed to examine customer segment shifts.
Funding
This study was supported by the Istanbul Technical University Scientific Research Projects Coordination Unit, BAP (Project Number: 48130).
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
Data is unavailable due to privacy restrictions.
Conflicts of Interest
The author declares no conflicts of interest to report regarding the present study.
References
- Wang, C.H. Apply robust segmentation to the service industry using kernel induced fuzzy clustering techniques. Expert Syst. Appl. 2010, 37, 8395–8400. [Google Scholar] [CrossRef] [Scilit]
- Fader, P.S.; Hardie, B.G. RFM and CLV: Using iso-value curves for customer base analysis. J. Mark. Res. 2005, 42, 415–430. [Google Scholar] [CrossRef] [Scilit]
- Wei, J.T.; Lee, M.C.; Chen, H.K.; Wu, H.H. Customer relationship management in the hairdressing industry: An application of data mining techniques. Expert Syst. Appl. 2013, 40, 7513–7518. [Google Scholar] [CrossRef] [Scilit]
- Tsai, C.Y.; Chiu, C.C. A purchase-based market segmentation methodology. Expert Syst. Appl. 2004, 27, 265–276. [Google Scholar] [CrossRef] [Scilit]
- Alves Gomes, M.; Meisen, T. A review on customer segmentation methods for personalized customer targeting in e-commerce use cases. Inf. Syst. e-Bus. Manag. 2023, 21, 527–570. [Google Scholar] [CrossRef] [Scilit]
- Wei, J.T.; Lin, S.Y.; Wu, H.H. A review of the application of RFM model. Afr. J. Bus. Manag. 2010, 4, 4199. [Google Scholar]
- Apte, C.; Bibelnieks, E.; Natarajan, R.; Pednault, E.; Tipu, F.; Campbell, D.; Nelson, B. Segmentation-based modeling for advanced targeted marketing. In Proceedings of the Seventh ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 26–29 August 2001; pp. 408–413. [Google Scholar]
- Dash, M.; Liu, H.; Xu, X. ‘1 + 1 > 2’: Merging distance and density based clustering. In Proceedings of the Seventh International Conference on Database Systems for Advanced Applications. DASFAA 2001; IEEE: New York, NY, USA, 2001; pp. 32–39. [Google Scholar]
- Hwang, H.; Jung, T.; Suh, E. An LTV model and customer segmentation based on customer value: A case study on the wireless telecommunication industry. Expert Syst. Appl. 2004, 26, 181–188. [Google Scholar] [CrossRef] [Scilit]
- Buckinx, W.; Van den Poel, D. Customer base analysis: Partial defection of behaviourally loyal clients in a non-contractual FMCG retail setting. Eur. J. Oper. Res. 2005, 164, 252–268. [Google Scholar] [CrossRef] [Scilit]
- Chicco, G.; Napoli, R.; Piglione, F. Comparisons among clustering techniques for electricity customer classification. IEEE Trans. Power Syst. 2006, 21, 933–940. [Google Scholar] [CrossRef] [Scilit]
- Cheng, C.H.; Chen, Y.S. Classifying the segmentation of customer value via RFM model and RS theory. Expert Syst. Appl. 2009, 36, 4176–4184. [Google Scholar] [CrossRef] [Scilit]
- Wu, R.S.; Chou, P.H. Customer segmentation of multiple category data in e-commerce using a soft-clustering approach. Electron. Commer. Res. Appl. 2011, 10, 331–341. [Google Scholar] [CrossRef] [Scilit]
- Chen, D.; Sain, S.L.; Guo, K. Data mining for the online retail industry: A case study of RFM model-based customer segmentation using data mining. J. Database Mark. Cust. Strategy Manag. 2012, 19, 197–208. [Google Scholar] [CrossRef] [Scilit]
- Syakur, M.A.; Khotimah, B.K.; Rochman, E.M.S.; Satoto, B.D. Integration k-means clustering method and elbow method for identification of the best customer profile cluster. In IOP Conference Series: Materials Science and Engineering; IOP Publishing: Bristol, UK, 2018; Volume 336, p. 012017. [Google Scholar]
- Christy, A.J.; Umamakeswari, A.; Priyatharsini, L.; Neyaa, A. RFM ranking–An effective approach to customer segmentation. J. King Saud Univ.-Comput. Inf. Sci. 2021, 33, 1251–1257. [Google Scholar] [CrossRef] [Scilit]
- Anitha, P.; Patil, M.M. RFM model for customer purchase behavior using K-Means algorithm. J. King Saud Univ.-Comput. Inf. Sci. 2022, 34, 1785–1792. [Google Scholar] [CrossRef] [Scilit]
- Li, P.; Wang, C.; Wu, J.; Madleňák, R. An E-commerce Customer Segmentation Method based on RFM Weighted K-means. In 2022 International Conference on Management Engineering, Software Engineering and Service Sciences (ICMSS); IEEE: New York, NY, USA, 2022; pp. 61–68. [Google Scholar]
- Marín Díaz, G. A fuzzy-XAI framework for customer segmentation and risk detection: Integrating RFM, 2-tuple modeling, and strategic scoring. Mathematics 2025, 13, 2141. [Google Scholar] [CrossRef] [Scilit]
- Grigorova, I.; Efremov, A.; Karamfilov, A. An Automated Machine Learning Framework for Interpretable Customer Segmentation in Financial Services. Int. J. Financ. Stud. 2025, 13, 243. [Google Scholar] [CrossRef] [Scilit]
- Tang, J. Unlocking retail insights: Predictive modeling and customer segmentation through data analytics. J. Theor. Appl. Electron. Commer. Res. 2025, 20, 59. [Google Scholar] [CrossRef] [Scilit]
- Ufeli, C.P.; Sattar, M.U.; Hasan, R.; Mahmood, S. Enhancing customer segmentation through factor analysis of mixed data (famd)-based approach using k-means and hierarchical clustering algorithms. Information 2025, 16, 441. [Google Scholar] [CrossRef] [Scilit]
- Wu, J.; Lin, Z. Research on customer segmentation model by clustering. In Proceedings of the 7th International Conference on Electronic Commerce, Xi’an, China, 15–17 August 2005; pp. 316–318. [Google Scholar]
- Yeh, I.C.; Yang, K.J.; Ting, T.M. Knowledge discovery on RFM model using Bernoulli sequence. Expert Syst. Appl. 2009, 36, 5866–5871. [Google Scholar] [CrossRef] [Scilit]
- Coussement, K.; Van den Poel, D. Improving customer attrition prediction by integrating emotions from client/company interaction emails and evaluating multiple classifiers. Expert Syst. Appl. 2009, 36, 6127–6134. [Google Scholar] [CrossRef] [Scilit]
- Hosseini, S.M.S.; Maleki, A.; Gholamian, M.R. Cluster analysis using data mining approach to develop CRM methodology to assess the customer loyalty. Expert Syst. Appl. 2010, 37, 5259–5264. [Google Scholar] [CrossRef] [Scilit]
- Khajvand, M.; Tarokh, M.J. Estimating customer future value of different customer segments based on adapted RFM model in retail banking context. Procedia Comput. Sci. 2011, 3, 1327–1332. [Google Scholar] [CrossRef] [Scilit]
- Chang, H.C.; Tsai, H.P. Group RFM analysis as a novel framework to discover better customer consumption behavior. Expert Syst. Appl. 2011, 38, 14499–14513. [Google Scholar] [CrossRef] [Scilit]
- Birant, D. Data mining using RFM analysis. Knowl.-Oriented Appl. Data Min. 2011, 3, 91–108. [Google Scholar]
- Hu, Y.H.; Yeh, T.W. Discovering valuable frequent patterns based on RFM analysis without customer identification information. Knowl.-Based Syst. 2014, 61, 76–88. [Google Scholar] [CrossRef] [Scilit]
- Zhang, Y.; Bradlow, E.T.; Small, D.S. Predicting customer value using clumpiness: From RFM to RFMC. Mark. Sci. 2015, 34, 195–208. [Google Scholar] [CrossRef] [Scilit]
- Peker, S.; Kocyigit, A.; Eren, P.E. LRFMP model for customer segmentation in the grocery retail industry: A case study. Mark. Intell. Plan. 2017, 35, 544–559. [Google Scholar] [CrossRef] [Scilit]
- Heldt, R.; Silveira, C.S.; Luce, F.B. Predicting customer value per product: From RFM to RFM/P. J. Bus. Res. 2021, 127, 444–453. [Google Scholar] [CrossRef] [Scilit]
- Wan, S.; Chen, J.; Qi, Z.; Gan, W.; Tang, L. Fast RFM model for customer segmentation. In Companion Proceedings of the Web Conference 2022; Association for Computing Machinery: New York, NY, USA, 2022; pp. 965–972. [Google Scholar]
- Taşabat, S.E.; Özçay, T.; Sertbaş, S.; Akca, E. A New RFM Model Approach: RFMS. In Industry 4.0 and the Digital Transformation of International Business; Springer Nature: Singapore, 2023; pp. 143–172. [Google Scholar]
- Rungruang, C.; Riyapan, P.; Intarasit, A.; Chuarkham, K.; Muangprathub, J. RFM model customer segmentation based on hierarchical approach using FCA. Expert Syst. Appl. 2024, 237, 121449. [Google Scholar] [CrossRef] [Scilit]
- Kumar, N. Intelligent customer segmentation: Unveiling consumer patterns with machine learning. J. Umm Al-Qura Univ. Eng. Archit. 2025, 16, 774–783. [Google Scholar] [CrossRef] [Scilit]
- Ebadi Jalal, M.; Elmaghraby, A. Analyzing the dynamics of customer behavior: A new perspective on personalized marketing through counterfactual analysis. J. Theor. Appl. Electron. Commer. Res. 2024, 19, 1660–1681. [Google Scholar] [CrossRef] [Scilit]
- Jain, A.K. Data clustering: 50 years beyond K-means. Pattern Recognit. Lett. 2010, 31, 651–666. [Google Scholar] [CrossRef] [Scilit]
- MacQueen, J. Classification and analysis of multivariate observations. In 5th Berkeley Symposium on Mathematical Statistics and Probability; University of California: Los Angeles, LA, USA, 1967; pp. 281–297. [Google Scholar]
- Comaniciu, D.; Meer, P. Mean shift: A robust approach toward feature space analysis. IEEE Trans. Pattern Anal. Mach. Intell. 2002, 24, 603–619. [Google Scholar] [CrossRef] [Scilit]
- Lloyd, S. Least squares quantization in PCM. IEEE Trans. Inf. Theory 1982, 28, 129–137. [Google Scholar] [CrossRef] [Scilit]
- Max, J. Quantizing for minimum distortion. IRE Trans. Inf. Theory 1960, 6, 7–12. [Google Scholar] [CrossRef] [Scilit]
- Forgy, E.W. Cluster Analysis of Multivariate Data: Efficiency vs Interpretability of Classifications. Biometrics 1965, 21, 768–780. [Google Scholar]
- Berkhin, P. A survey of clustering data mining techniques. In Grouping Multidimensional Data: Recent Advances in Clustering; Springer: Berlin/Heidelberg, Germany, 2006; pp. 25–71. [Google Scholar]
- Huang, Z. A fast clustering algorithm to cluster very large categorical data sets in data mining. Dmkd 1997, 3, 34–39. [Google Scholar]
- Peter, J.; Rousseeuw, S. A graphical aid to the interpretation and validation of cluster analysis. J. Comput. Appl. Math. 1987, 20, 53–65. [Google Scholar] [CrossRef] [Scilit]
- Sinaga, K.P.; Yang, M.S. Unsupervised K-means clustering algorithm. IEEE Access 2020, 8, 80716–80727. [Google Scholar] [CrossRef] [Scilit]
- Rdusseeun, L.K.P.J.; Kaufman, P. Clustering by means of medoids. In Proceedings of the Statistical Data Analysis Based on the L1 Norm Conference, Neuchatel, Switzerland; North-Holland: Amsterdam, The Netherlands, 1987; pp. 405–416. [Google Scholar]
- Bezdek, J.C. Cluster validity with fuzzy sets. J. Cybern. 1973, 3, 58–73. [Google Scholar] [CrossRef] [Scilit]
- Krishnapuram, R.; Keller, J.M. A possibilistic approach to clustering. IEEE Trans. Fuzzy Syst. 2002, 1, 98–110. [Google Scholar] [CrossRef] [Scilit]
- Xie, X.L.; Beni, G. A validity measure for fuzzy clustering. IEEE Trans. Pattern Anal. Mach. Intell. 1991, 13, 841–847. [Google Scholar] [CrossRef] [Scilit]
- Bezdek, J.C.; Pal, N.R. Cluster validation with generalized Dunn’s indices. In Proceedings 1995 Second New Zealand International Two-Stream Conference on Artificial Neural Networks and Expert Systems; IEEE: New York, NY, USA, 1995; pp. 190–193. [Google Scholar]
- Dunn, J.C. A fuzzy relative of the ISODATA process and its use in detecting compact well-separated clusters. J. Cybern. 1973, 3, 32–57. [Google Scholar] [CrossRef] [Scilit]
- Davies, D.L.; Bouldin, D.W. A cluster separation measure. IEEE Trans. Pattern Anal. Mach. Intell. 1979, 2, 224–227. [Google Scholar] [CrossRef] [Scilit]
- Li, S.; Qian, Y.; Wang, Y.; Yang, Y.; Wu, Y. A clustering algorithm for Chinese microblog texts based on semantic similarity. J. Intell. Fuzzy Syst. 2016, 31, 1889–1901. [Google Scholar]
- Li, Q.; Liu, Y. Exploring the diversity of retweeting behavior patterns in Chinese microblogging platform. Inf. Proc. Manag. 2017, 53, 945–962. [Google Scholar] [CrossRef] [Scilit]
- Bandyopadhyay, S.; Maulik, U. Genetic clustering for automatic evolution of clusters and application to image classification. Pattern Recognit. 2002, 35, 1197–1208. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.


