K-Means Clustering untuk Segmentasi Pelanggan: Mengungkap Pola Pembelian Strategi Pemasaran pada Sektor Ritel - Artiarno, Andrean Maulana; Setiaji, Pratomo; Nugraha, Fajar (Universitas Hamzanwadi, 2025)
Digital transformation has posed new challenges for retail companies in understanding consumer behavior due to the increasing volume of data and continuously changing preferences. This study aims to uncover purchasing patterns among retail customers and to provide data-driven marketing strategies through customer segmentation using the K-Means Clustering algorithm. This research adopts a quantitative exploratory approach using 3,900 synthetic entries from the Kaggle platform, representing retail transactions. The analysis focuses on variables such as age, gender, product category, location, purchase amount, and transaction frequency. The analytical process includes data preprocessing, dimensionality reduction using PCA, and segmentation with the K-Means algorithm. The optimal number of clusters was determined using the Elbow Method and Silhouette Score, while the quality of the clustering was evaluated using internal metrics, namely the Calinski-Harabasz Score (491.47) and the Davies-Bouldin Score (2.02). These values indicate a well-structured and reliable clustering result. Our findings reveal five distinct customer segments with varying characteristics, ranging from teenagers with small and periodic purchases to high-value adult customers who transact infrequently. These insights serve as the foundation for developing marketing strategies such as loyalty programs, seasonal promotions, and exclusive approaches.