Optimasi K-Means Menggunakan Algoritma Firefly Untuk Segmentasi Pelanggan pada E-commerce
Abstract
Segmentasi pelanggan menjadi komponen krusial dalam e-commerce untuk mendukung personalisasi penawaran, meningkatkan loyalitas pelanggan, dan mendukung keputusan strategis. Penelitian ini mengusulkan optimasi algoritma KMeans dengan algoritma Firefly untuk meningkatkan akurasi segmentasi pelanggan berdasarkan model Recency, Frequency, dan Monetary (RFM). Algoritma K-Means dipilih karena efisiensinya dalam memproses data berskala besar, namun sering menghadapi keterbatasan dalam menentukan solusi optimal global akibat sensitivitas terhadap inisialisasi centroid. Algoritma Firefly diimplementasikan untuk mengatasi kelemahan tersebut melalui eksplorasi ruang solusi yang lebih luas dan kemampuan menghindari jebakan solusi lokal optimal. Data yang digunakan dalam penelitian ini adalah dataset transaksi retail daring yang
mencakup lebih dari 500.000 entri. Tahapan penelitian meliputi pembersihan data, analisis eksplorasi data (EDA), klasterisasi dengan K-Means, Firefly, dan kombinasi keduanya. Hasil eksperimen menunjukkan bahwa kombinasi K-Means dan Firefly menghasilkan nilai Silhouette Score yang konsisten di atas 0,9 sepanjang 50 iterasi, dengan stabilitas yang lebih baik dibandingkan algoritma individu. Segmentasi menghasilkan lima klaster yang mencerminkan karakteristik pelanggan yang unik, seperti aktivitas transaksi, frekuensi, dan kontribusi moneter. Metode hibrida ini tidak hanya memperbaiki kualitas klaster tetapi juga memberikan hasil yang lebih stabil dan terstruktur. Kesimpulannya, kombinasi K-Means dan Firefly menawarkan pendekatan efektif dalam segmentasi pelanggan e-commerce, memberikan landasan yang lebih kuat untuk pengambilan keputusan pemasaran yang terarah dan strategi peningkatan loyalitas pelanggan.
Downloads
References
V. Urbancokova, M. Kompan, Z. Trebulova, and M. Bielikova, “BEHAVIOR-BASED CUSTOMER DEMOGRAPHY
PREDICTION IN E-COMMERCE.” [Online]. Available: https://eur-lex.europa.eu/legalcontent/
EN/TXT/?uri=OJ:L:2016:119:TOC
Y. J. Purnomo, “Digital Marketing Strategy to Increase Sales Conversion on E-commerce Platforms,” Journal of
Contemporary Administration and Management (ADMAN), vol. 1, no. 2, pp. 54–62, Aug. 2023, doi:
61100/adman.v1i2.23.
T. Jiang and A. Tuzhilin, "Improving Personalization Solutions through Optimal Segmentation of Customer Bases," in IEEE Transactions on Knowledge and Data Engineering, vol. 21, no. 3, pp. 305-320, March 2009, doi: 10.1109/TKDE.2008.163.
V. Vijilesh, A. Harini, M. H. Dharshini, and R. Priyadharshini, “CUSTOMER SEGMENTATION USING MACHINE
LEARNING,” International Research Journal of Engineering and Technology, 2021, [Online]. Available: www.irjet.net
K. Tabianan, S. Velu, and V. Ravi, “K-Means Clustering Approach for Intelligent Customer Segmentation Using
Customer Purchase Behavior Data,” Sustainability (Switzerland), vol. 14, no. 12, Jun. 2022, doi: 10.3390/su14127243.
B. Jamalpur, D. Singh, B. S. Kumar, A. Nagpal, S. Pawar, and D. Banerjee, “Applications of Deep Learning in Marketing Analytics: Predictive Modeling and Segmenting Customers,” in Proceedings of International Conference on Communication, Computer Sciences and Engineering, IC3SE 2024, Institute of Electrical and Electronics Engineers Inc., 2024, pp. 1473–1477. doi: 10.1109/IC3SE62002.2024.10593465.
X. Wang, B. Cai, and K. Salleh, “Research on the application of cluster analysis in cross-border e-commerce customer segmentation and market strategy,” Applied Mathematics and Nonlinear Sciences, vol. 9, no. 1, Jan. 2024, doi: 10.2478/amns- 2024-2568.
V. Dawane, P. Waghodekar, and J. Pagare, “International Conference on Smart Data Intelligence (ICSMDI 2021) RFM Analysis Using K-Means Clustering to Improve Revenue and Customer Retention.” [Online]. Available: https://ssrn.com/abstract=3852887
A. Abdulhafedh, “Incorporating K-means, Hierarchical Clustering and PCA in Customer Segmentation,” Journal of City and Development, vol. 3, no. 1, pp. 12–30, 2021, doi: 10.12691/jcd-3-1-3.
W. T. Saputro, M. Murhadi, and H. M. Jumasa, "Menemukan Pola Sebaran Vaksinasi Data Covid-19 di Indonesia
Menggunakan Algoritma K-Means," Jurnal Fasilkom, vol. 13,no. 2, pp. 244–250, Aug. 2023. [Online]. Available:
https://doi.org/10.37859/jf.v13i02.5551
M. P. A. Budiman and D. Winarso, "Penerapan Algoritma KMedoids Clustering untuk Pengelompokan Bulan Rawan Bencana Kabut Asap di Kota Pekanbaru," Jurnal Fasilkom, vol. 14, no. 1, pp. 1–8, Apr. 2024. [Online]. Available: https://doi.org/10.37859/jf.v14i1.6858
G. Lefait and T. Kechadi, “Customer segmentation architecture based on clustering techniques,” in 4th International Conference on Digital Society, ICDS 2010, Includes CYBERLAWS 2010: The 1st International Conference on Technical and Legal Aspects of the e-Society, 2010, pp. 243–248. doi: 10.1109/ICDS.2010.47.
A. M. Ikotun, A. E. Ezugwu, L. Abualigah, B. Abuhaija, and J. Heming, “K-means clustering algorithms: A comprehensive review, variants analysis, and advances in the era of big data,” Inf Sci (N Y), vol. 622, pp. 178–210, Apr. 2023, doi: 10.1016/j.ins.2022.11.139.
Y. Deng and Q. Gao, “A study on e-commerce customer segmentation management based on improved K-means algorithm,” Dec. 01, 2020, Springer Science and Business Media Deutschland GmbH. doi: 10.1007/s10257-018-0381-3.
A. M. Ikotun, M. S. Almutari, and A. E. Ezugwu, “K‐meansbased nature‐inspired metaheuristic algorithms for automatic data clustering problems: Recent advances and future directions,” Dec. 01, 2021, MDPI. doi: 10.3390/app112311246.
Maazalahi, M., Hosseini, S. K-means and meta-heuristic algorithms for intrusion detection systems. Cluster Comput 27, 10377–10419 (2024). doi: 10.1007/s10586-024-04510-7
S. Mehrotra, A. Sharan, and N. Varish, “Improving search result clustering using nature inspired approach,” Multimed Tools Appl, vol. 83, no. 23, pp. 62971–62988, Jul. 2024, doi: 10.1007/s11042-023-18067-x.
H. Xie et al., “Improving K-means clustering with enhanced Firefly Algorithms,” Applied Soft Computing Journal, vol. 84, Nov. 2019, doi: 10.1016/j.asoc.2019.105763.
V. Arul, A. Kumar, and A. Agarwal, "Segmenting Mall Customers Data to Improve Business into Higher Target using K-Means Clustering," in *2021 3rd International Conference on Advances in Computing, Communication Control and Networking (ICAC3N)*, Dec. 2021, pp. 1602-1604. IEEE.
S. J. Nanda and G. Panda, “A survey on nature inspired metaheuristic algorithms for partitional clustering,” 2014, Elsevier. doi: 10.1016/j.swevo.2013.11.003.
Singh, R. V., & Bhatia, M. P. S. (2011). Data clustering with modified K-means algorithm. *IEEE International Conference on Recent Trends in Information Technology (ICRTIT)*, 717- 721. Anna University, Chennai.
https://doi.org/10.1109/ICRTIT.2011.5972391
M. Ghasemi, S. kadkhoda Mohammadi, M. Zare, S. Mirjalili, M. Gil, and R. Hemmati, “A new firefly algorithm with improved global exploration and convergence with application to engineering optimization,” Decision Analytics Journal, vol. 5, Dec. 2022, doi: 10.1016/j.dajour.2022.100125.
A. Alam and M. K. Ahamad, “K-Means Hybridization with Enhanced Firefly Algorithm for High-Dimension Automatic Clustering,” Journal of Advanced Research in Applied Sciences and Engineering Technology, vol. 33, no. 3, pp. 137–153, Feb. 2024, doi: 10.37934/araset.33.3.137153.
Copyright (c) 2025 Dwi Tatang Warianta, Paramesti Astagina, Richy Julianto, Florentina Yuni Arini (Author)

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Copyright Notice
An author who publishes in the Jurnal FASILKOM (teknologi inFormASi dan ILmu KOMputer) agrees to the following terms:
- Author retains the copyright and grants the journal the right of first publication of the work simultaneously licensed under the Creative Commons Attribution-ShareAlike 4.0 License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal
- Author is able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book) with the acknowledgement of its initial publication in this journal.
- Author is permitted and encouraged to post his/her work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of the published work (See The Effect of Open Access).
Read more about the Creative Commons Attribution-ShareAlike 4.0 Licence here: https://creativecommons.org/licenses/by-sa/4.0/.

