Evaluating K-Means and DBSCAN for E-Commerce Customer Segmentation
Customer segmentation based on transaction histories requires consideration of both internal cluster quality and customer coverage. This study evaluated K-Means and DBSCAN using Recency, Frequency, and Monetary (RFM) features from an anonymized Indonesian e-commerce platform. After screening, 3,868 retained orders recorded between June 2021 and June 2023 were aggregated into 2,692 customer profiles. Both algorithms used the same min–max-normalized RFM matrix. Internal validation employed the Silhouette Coefficient, Davies–Bouldin index, and Calinski–Harabasz index. K-Means with K = 3 produced a full-sample Silhouette Coefficient of 0.4169. DBSCAN with ε = 0.13 and min_samples = 5 identified four clusters covering 94.3% of customers and labelled 153 customers as noise. On the matched subset of 2,539 non-noise customers, the Silhouette Coefficients were 0.4350 for K-Means and 0.2017 for DBSCAN. The smallest K-Means cluster contained 15.0% of customers and had the highest mean Frequency and Monetary. Among the DBSCAN clusters, the highest mean Frequency and Monetary occurred in different groups, while the noise group had the highest reported mean Monetary overall. These findings indicate that internal validation should be interpreted alongside customer coverage and the original purchasing profiles of assigned and unassigned customers.
Authors
- Lily Puspa Dewi (ORCID: https://orcid.org/0000-0003-2435-2951)
- Gregorius Satio Budhi
- Jonathan Febrian Pratignyo
Institutions
- Petra Christian University (ID)
Publication Details
- Journal
- Teknika
- Published
- 2026-11-24
- DOI
- https://doi.org/10.34148/teknika.v15i3.1547
- Primary Topic
- Customer churn and segmentation
- Type
- article
- Field-Weighted Citation Impact
- 0.00