This study aimed to perform customer segmentation on e-commerce transaction data using K-Means and Density-Based Spatial clustering of Applications with noise (DBSCAN) algorithms. Transaction data were transformed using the Recency, Frequency, and Monetary (RFM) model and normalized using the Min-max scaling method. The performance of both algorithms was evaluated based on the silhouette score, the number of generated clusters, and computational time efficiency. The experimental results indicated that the K-Means algorithm was superior and more functional for customer segmentation on this dataset, successfully forming two stable clusters with an instant processing time of 0.004 seconds. Conversely, the DBSCAN algorithm failed to perform proper segmentation by generating only a single cluster, despite producing a mathematically higher silhouette score of 0.427. Additionally, this study implemented a web-based simulation system using the Flask framework to facilitate the visualization of segmentation results. This study concluded that the K-Means algorithm was the most adaptive and recommended method to support business decision-making.
Copyrights © 2026